config is in uif 1.1.1-1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | #!/bin/sh
set -e
# Source debconf library.
. /usr/share/debconf/confmodule
is_ip() {
echo "$1" | egrep -q '^([01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.([01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.([01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.([01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])$'
}
is_net() {
NET=`echo "$1" | cut -d/ -f1`
MASK=`echo "$1" | cut -d/ -f2`
is_ip "$MASK" && is_ip "$NET" && return 0
echo "$MASK"|egrep -q '^([0-2]?[0-9]?|3[0-2])$' && is_ip "$NET" && return 0
return 1
}
is_host() {
host "$1" 2> /dev/null| egrep '([01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.([01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.([01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.([01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])' | cut -f3
}
# Chooser for conf_method
db_input high uif/conf_method || true
db_go
# Check their answer.
db_get uif/conf_method
case "$RET" in
workstation)
# show message
db_input high uif/workstation || true
db_go
# configure ping / traceroutes
db_input high uif/pings || true
db_go
db_input high uif/traceroute || true
db_go
# configure trusted hosts
while true; do
db_input high uif/trusted || true
db_go
db_get uif/trusted
if [ -n "$RET" ]; then
for i in $RET; do
WORKS=0
is_ip "$i" && WORKS=1
[ $WORKS -eq "0" ] && is_net "$i" && WORKS=1
[ $WORKS -eq "0" ] && HOST=`is_host "$i"`
[ -n "$HOST" ] && WORKS=1
if [ $WORKS -eq 0 ]; then
db_input high uif/error || true
db_go
break
fi
done
[ $WORKS -eq 0 ] && continue
fi
break
done
;;
*)
;;
esac
exit 0
|