config root man

Current Path : /usr/src/crypto/heimdal/packages/debian/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/src/crypto/heimdal/packages/debian/heimdal-servers.postinst

#!/bin/sh -e

add_servers() {
kshell_entry="kshell	stream	tcp	nowait	root	/usr/sbin/tcpd /usr/lib/heimdal-servers/rshd -k"
   ftp_entry="ftp	stream	tcp	nowait	root	/usr/sbin/tcpd /usr/lib/heimdal-servers/ftpd -a plain"
telnet_entry="telnet	stream	tcp	nowait	root	/usr/sbin/tcpd /usr/lib/heimdal-servers/telnetd -a none"
 pop3_entry="pop-3	stream	tcp	nowait	root	/usr/sbin/tcpd /usr/lib/heimdal-servers/popper"

	update-inetd --group KRB5 --add "$kshell_entry"
	update-inetd --group KRB5 --add "$ftp_entry"
	update-inetd --group KRB5 --add "$telnet_entry"
	update-inetd --group KRB5 --add "$pop3_entry"
}

enable_servers() {
	update-inetd --pattern '[ \t]/usr/lib/heimdal-servers/rshd' --enable kshell
	update-inetd --pattern '[ \t]/usr/lib/heimdal-servers/ftpd' --enable ftp
	update-inetd --pattern '[ \t]/usr/lib/heimdal-servers/telnetd' --enable telnet
	update-inetd --pattern '[ \t]/usr/lib/heimdal-servers/popper' --enable pop-3
}

remove_servers() {
	update-inetd --remove 'kshell[ \t].*[ \t]/usr/lib/heimdal-servers/rshd'
	update-inetd --remove 'ftp[ \t].*[ \t]/usr/lib/heimdal-servers/ftpd'
	update-inetd --remove 'telnet[ \t].*[ \t]/usr/lib/heimdal-servers/telnetd'
	update-inetd --remove 'pop-3[ \t].*[ \t]/usr/lib/heimdal-servers/popper'
}

case "$1" in
abort-upgrade | abort-deconfigure | abort-remove)
	enable_servers
	;;
configure)
	if [ -n "$2" ] && dpkg --compare-versions "$2" ge 0.3e-4; then
		enable_servers
	else
		remove_servers
		add_servers
	fi
	;;
*)
	printf "$0: incorrect arguments: $*\n" >&2
	exit 1
	;;
esac

#DEBHELPER#

Man Man