1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
#!/bin/bash
set -e
. /usr/share/debconf/confmodule
FILE=/root/tmp/HyperSpec-6-0.tar.gz
check_archive()
{
# check if the file is ok
if [ -s "$FILE" -a ! -L "$FILE" -a ! -O "$FILE" -a ! -G "$FILE" ] && \
gzip --test --quiet "$FILE" > /dev/null 2>&1 ; then
true
else
false
fi
}
if test "$1" = "reconfigure" ; then
db_reset cltl/downloading
fi
case "$1" in
configure|reconfigure)
set +e
check_archive
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
|