3
# create a new /etc/inetd.conf file if it doesn't already exist
5
[ -e /etc/inetd.conf ] && return 0
7
cat <<EOF > /etc/inetd.conf
8
# /etc/inetd.conf: see inetd(8) for further informations.
10
# Internet superserver configuration database
13
# Lines starting with "#:LABEL:" or "#<off>#" should not
14
# be changed unless you know what you are doing!
16
# If you want to disable an entry so it isn't touched during
17
# package updates just comment it out with a single '#' character.
19
# Packages should modify this file by using update-inetd(8)
21
# <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
23
#:INTERNAL: Internal services
24
#discard stream tcp nowait root internal
25
#discard dgram udp wait root internal
26
#daytime stream tcp nowait root internal
27
#time stream tcp nowait root internal
29
#:STANDARD: These are standard services.
31
#:BSD: Shell, login, exec and talk are BSD protocols.
33
#:MAIL: Mail, news and uucp services.
37
#:BOOT: TFTP service is provided primarily for booting. Most sites
38
# run this only on machines acting as "boot servers."
40
#:RPC: RPC based services
42
#:HAM-RADIO: amateur-radio services
44
#:OTHER: Other services
48
chmod 644 /etc/inetd.conf
51
upgrade_from_old_inetd() {
52
if [ "$2" ] && dpkg --compare-versions "$2" ge 0.20040915-1; then
56
# XXX the binary will change after removing the diversions, so we want
57
# to be sure that the daemon has been stopped by that time
58
start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/inetd.pid
60
# remove the diversions created by old versions of this package
61
DIVERT="/usr/sbin/inetd /usr/share/man/man8/inetd.8.gz /usr/share/man/man5/inetd.conf.5.gz"
62
for file in $DIVERT; do
63
[ -e $file.netkit ] || continue
65
dpkg-divert --package openbsd-inetd --remove --divert $file.netkit $file
74
upgrade|abort-upgrade)
75
upgrade_from_old_inetd "$@"
79
echo "$0 called with unknown argument '$1'" >&2