No empty .Rs/.Re
[netbsd-mini2440.git] / crypto / dist / heimdal / packages / debian / heimdal-servers.postinst
bloba1d936081eadba313d2754a29c2c6edfc14c0dcb
1 #!/bin/sh -e
3 add_servers() {
4 kshell_entry="kshell stream tcp nowait root /usr/sbin/tcpd /usr/lib/heimdal-servers/rshd -k"
5 ftp_entry="ftp stream tcp nowait root /usr/sbin/tcpd /usr/lib/heimdal-servers/ftpd -a plain"
6 telnet_entry="telnet stream tcp nowait root /usr/sbin/tcpd /usr/lib/heimdal-servers/telnetd -a none"
7 pop3_entry="pop-3 stream tcp nowait root /usr/sbin/tcpd /usr/lib/heimdal-servers/popper"
9 update-inetd --group KRB5 --add "$kshell_entry"
10 update-inetd --group KRB5 --add "$ftp_entry"
11 update-inetd --group KRB5 --add "$telnet_entry"
12 update-inetd --group KRB5 --add "$pop3_entry"
15 enable_servers() {
16 update-inetd --pattern '[ \t]/usr/lib/heimdal-servers/rshd' --enable kshell
17 update-inetd --pattern '[ \t]/usr/lib/heimdal-servers/ftpd' --enable ftp
18 update-inetd --pattern '[ \t]/usr/lib/heimdal-servers/telnetd' --enable telnet
19 update-inetd --pattern '[ \t]/usr/lib/heimdal-servers/popper' --enable pop-3
22 remove_servers() {
23 update-inetd --remove 'kshell[ \t].*[ \t]/usr/lib/heimdal-servers/rshd'
24 update-inetd --remove 'ftp[ \t].*[ \t]/usr/lib/heimdal-servers/ftpd'
25 update-inetd --remove 'telnet[ \t].*[ \t]/usr/lib/heimdal-servers/telnetd'
26 update-inetd --remove 'pop-3[ \t].*[ \t]/usr/lib/heimdal-servers/popper'
29 case "$1" in
30 abort-upgrade | abort-deconfigure | abort-remove)
31 enable_servers
33 configure)
34 if [ -n "$2" ] && dpkg --compare-versions "$2" ge 0.3e-4; then
35 enable_servers
36 else
37 remove_servers
38 add_servers
42 printf "$0: incorrect arguments: $*\n" >&2
43 exit 1
45 esac
47 #DEBHELPER#