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
|
#!/bin/sh
set -e
. /usr/share/debconf/confmodule
FILE=/root/tmp/HyperSpec-7-0.tar.gz
check_archive()
{
# check if the file is ok
if [ -s "$FILE" ] && \
gzip --test --quiet "$FILE" > /dev/null 2>&1 ; then
true
else
false
fi
}
if test "$1" = "reconfigure" ; then
db_reset hyperspec/downloading
fi
case "$1" in
configure|reconfigure)
if ! check_archive ; then
db_input medium hyperspec/downloading || true
db_go || true
fi
;;
*)
echo "config called with invalid option" >&2
exit 0
;;
esac
exit 0
|