#!/bin/sh 

set -e

. /usr/share/debconf/confmodule

ARCHIVE=/root/tmp/cltl_ht.tgz

okay()
{
    test -s ${ARCHIVE} && gzip --test --quiet ${ARCHIVE} > /dev/null 2>&1
}

if test "$1" = "reconfigure" ; then
    db_reset cltl/downloading
fi

case "$1" in
    configure|reconfigure)
	set +e
	okay
	if [ $? != 0 ]; then
	    db_input medium cltl/downloading
	    db_go
	fi
	set -e
	;;
    *) 
	echo "config called with invalid option" >&2
	exit 0
	;;
esac

exit 0
