#!/bin/sh -e # xinetd postinst # stop inetd and portmap if [ -x /usr/sbin/inetd ]; then start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/inetd.pid \ --exec /usr/sbin/inetd fi if [ -x /sbin/portmap ]; then start-stop-daemon --stop --quiet --oknodo --exec /sbin/portmap fi # stop xinetd itself if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d xinetd stop elif [ -x /etc/init.d/xinetd ]; then /etc/init.d/xinetd stop >&2 else start-stop-daemon --quiet --stop --signal 3 --oknodo --exec /usr/sbin/xinetd fi # divert inetd's init script dpkg-divert --package xinetd --add --rename \ --divert /etc/init.d/inetd.real /etc/init.d/inetd >&2 # make dummy /etc/init.d/inetd file cat <<%EOF% >/etc/init.d/inetd #!/bin/sh # /etc/init.d/inetd has been diverted by the xinetd package. # The inetd service is provided by xinetd, which means inetd # doesn't need to be run. # # See /etc/init.d/xinetd, or /etc/init.d/inetd.real. exit 0 %EOF% chmod 755 /etc/init.d/inetd #DEBHELPER#