diff -u xinetd-2.3.14/debian/changelog xinetd-2.3.14/debian/changelog --- xinetd-2.3.14/debian/changelog +++ xinetd-2.3.14/debian/changelog @@ -1,3 +1,9 @@ +xinetd (1:2.3.14-7ubuntu4) natty; urgency=low + + * add xinetd upstart job (LP: #43574) + + -- Scott Moser Tue, 13 Jul 2010 09:24:49 -0400 + xinetd (1:2.3.14-7ubuntu3) lucid; urgency=low * rebuild rest of main for armel armv7/thumb2 optimization; only in patch2: unchanged: --- xinetd-2.3.14.orig/debian/xinetd.upstart +++ xinetd-2.3.14/debian/xinetd.upstart @@ -0,0 +1,53 @@ +# xinetd - the extended Internet services daemon +description "xinetd daemon" + +start on runlevel [2345] +stop on runlevel [!2345] + +## because signal QUIT is sent in pre-stop, respawn cannot be used. +## (LP: #605007) +#respawn + +pre-start script + test -x /usr/sbin/xinetd || { stop; exit 0; } +end script + +env PIDFILE=/var/run/xinetd.pid +script + INETD_COMPAT=Yes + XINETD_OPTS="-stayalive" + + # per upstart convention, options should be set in the upstart job itself. + # However, to be friendly, source and respect old defaults file. + [ ! -f /etc/default/xinetd ] || . /etc/default/xinetd + + case "$INETD_COMPAT" in + [Yy]*) + XINETD_OPTS="$XINETD_OPTS -inetd_compat" + if perl -MSocket -e 'exit (!socket($sock, AF_INET6, SOCK_STREAM, 0))'; then + XINETD_OPTS="$XINETD_OPTS -inetd_ipv6" + fi + ;; + esac + + checkportmap () { + if grep "^[^ *#]" /etc/xinetd.conf | grep -q 'rpc/'; then + if ! rpcinfo -u localhost portmapper >/dev/null 2>&1; then + echo + echo "WARNING: portmapper inactive - RPC services unavailable!" + echo " Commenting out or removing the RPC services from" + echo " the /etc/xinetd.conf file will remove this message." + echo + fi + fi + } + + checkportmap + exec /usr/sbin/xinetd -dontfork -pidfile "$PIDFILE" $XINETD_OPTS +end script + +pre-stop script + xinetd_pid=$(status | awk '/stop\/pre-stop/ { print $NF }') + [ -n "${xinetd_pid}" ] || exit 0 + kill -QUIT "${xinetd_pid}" +end script