4 # stop inetd and portmap
5 if [ -x /usr/sbin/inetd ]; then
6 start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/inetd.pid \
9 if [ -x /sbin/portmap ]; then
10 start-stop-daemon --stop --quiet --oknodo --exec /sbin/portmap
14 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
15 invoke-rc.d xinetd stop
16 elif [ -x /etc/init.d/xinetd ]; then
17 /etc/init.d/xinetd stop >&2
19 start-stop-daemon --quiet --stop --signal 3 --oknodo --exec /usr/sbin/xinetd
22 # divert inetd's init script
23 dpkg-divert --package xinetd --add --rename \
24 --divert /etc/init.d/inetd.real /etc/init.d/inetd >&2
26 # make dummy /etc/init.d/inetd file
27 cat <<%EOF% >/etc/init.d/inetd
30 # /etc/init.d/inetd has been diverted by the xinetd package.
31 # The inetd service is provided by xinetd, which means inetd
32 # doesn't need to be run.
34 # See /etc/init.d/xinetd, or /etc/init.d/inetd.real.
38 chmod 755 /etc/init.d/inetd