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
|
#!/bin/sh
set -e
. /usr/share/debconf/confmodule
anon='off'
prefix='#<off>#'
dir='/home/ftp'
inetdentry='kermit stream tcp nowait root /usr/sbin/tcpd /usr/sbin/iksd'
iksd_args='-A --initfile:/etc/kermit/iksd-anon.conf --dbfile:/var/run/iksd.db --syslog:5'
if [ "$1" = "configure" ]
then
gotinetd=0
if [ -x "`which update-inetd 2>/dev/null`" ]; then
gotinetd=1
fi
db_get ckermit/iksd || true
if [ "$RET" = true ]
then
if [ $gotinetd -eq 0 ]; then
db_fset ckermit/iksd seen false || true
db_input critical ckermit/iksd-no-inetd || true
db_go || true
else
prefix=""
db_get ckermit/iksd-anon || true
if [ "$RET" = true ]
then
anon="on"
db_get ckermit/iksd-anondir || true
dir="$RET"
fi
fi
fi
if [ $gotinetd -eq 1 ]; then
iksd_args="$iksd_args --root:$dir --anonymous:$anon"
update-inetd --remove "kermit"
update-inetd --add "$prefix$inetdentry $iksd_args"
fi
fi
#DEBHELPER#
exit 0
|