diff -u pyro-3.7/debian/changelog pyro-3.7/debian/changelog --- pyro-3.7/debian/changelog +++ pyro-3.7/debian/changelog @@ -1,3 +1,9 @@ +pyro (3.7-2ubuntu1) intrepid; urgency=low + + * Added init script for pyro-nsd + + -- Jonathan Carter Thu, 03 Jul 2008 20:28:06 +0200 + pyro (3.7-2) unstable; urgency=medium [ Bernd Zeimetz ] diff -u pyro-3.7/debian/rules pyro-3.7/debian/rules --- pyro-3.7/debian/rules +++ pyro-3.7/debian/rules @@ -67,6 +67,8 @@ # in the same order (instead of reverse order), which fails for # python-central+init.d. dh_installinit --noscripts -ppyro --name=pyro-nsd + dh_installinit --noscripts -ppyro --name=pyro-esd + # some permissions that makes lintian/linda happier find debian/pyro-examples/usr/share/doc/pyro/examples -exec chmod a-x {} \; chmod 755 $(CURDIR)/debian/pyro-gui/`pycentral pycentraldir pyro-gui`/Pyro/wxnsc.py only in patch2: unchanged: --- pyro-3.7.orig/debian/pyro.pyro-esd.default +++ pyro-3.7/debian/pyro.pyro-esd.default @@ -0,0 +1,8 @@ +# /etc/default/pyro-esd + +# Change to one to enable pyro-esd +ENABLED=0 + +# Options to pass to pyro-esd +OPTIONS="" + only in patch2: unchanged: --- pyro-3.7.orig/debian/pyro.pyro-esd.init +++ pyro-3.7/debian/pyro.pyro-esd.init @@ -0,0 +1,73 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: pyro-esd +# Required-Start: $time $local_fs $remote_fs $network +# Required-Stop: $time $local_fs $remote_fs $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Pyro name server daemon +# Description: Debian init script for pyro-esd (Pyro name server daemon) +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/bin/pyro-esd +DESC="Pyro name server daemon" +NAME=pyro-esd + +test -x $DAEMON || exit 0 + +# Defaults - don't touch, edit /etc/default/pyro-esd +ENABLED=0 + +if [ -f /etc/default/pyro-esd ] ; then + . /etc/default/pyro-esd +fi + +if [ "$ENABLED" = "0" ]; then + echo "$DESC: disabled, see /etc/default/pyro-esd" + exit 0 +fi + +PYRO_NS=/usr/bin/pyro-esd +PYRO_PID=/var/run/pyro-esd.pid +END_PHRASE="python remote objects name service: pyro-esd" + +set -e + +case "$1" in + start) + echo -n "Starting $DESC: " + $DAEMON start $OPTIONS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + $DAEMON stop + echo "$NAME." + ;; + restart|force-reload) + echo -n "Restarting $DESC: " + $DAEMON stop + sleep 1 + $DAEMON start $OPTIONS + echo "$NAME." + ;; + status) + STATUS="$($DAEMON status)" + echo "$STATUS" + if echo "$STATUS" | grep -q "not running"; then + if [ -f "$PYRO_PID" ]; then + exit 1 + else + exit 3 + fi + fi + ;; + *) + echo -n "Usage: /etc/init.d/pyro-esd " >&2 + echo "{start|stop|restart|force-reload|status}" >&2 + exit 1 + ;; +esac + +exit 0