Bug#754446: wheezy-pu: fix #609457 in supervisor package
Package: release.debian.org
Severity: normal
The init script of supervisor in wheezy is broken (I tend to call
the package unusable for any system that includes automated
configuration management and monitoring), see #609457
The init script from the current package version of jessie/unstable
works fine so I think this change could go towards wheezy(-updates).
debdiff supervisor_3.0a8-1.1.dsc supervisor_3.0a8-1.1+deb7u1.dsc
is attached.
regards,
-mika-
diff -u supervisor-3.0a8/debian/supervisor.init supervisor-3.0a8/debian/supervisor.init
--- supervisor-3.0a8/debian/supervisor.init
+++ supervisor-3.0a8/debian/supervisor.init
@@ -21,6 +21,7 @@
# subprocesses.
### END INIT INFO
+. /lib/lsb/init-functions
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/supervisord
@@ -40,6 +41,7 @@
if [ -f /etc/default/supervisor ] ; then
. /etc/default/supervisor
fi
+DAEMON_OPTS="-c /etc/supervisor/supervisord.conf $DAEMON_OPTS"
set -e
@@ -78,7 +80,7 @@
kill -9 $pid
[ -n "$DODTIME" ] && sleep "$DODTIME"s
if running ; then
- echo "Cannot kill $LABEL (pid=$pid)!"
+ echo "Cannot kill $NAME (pid=$pid)!"
exit 1
fi
fi
@@ -91,7 +93,7 @@
start)
echo -n "Starting $DESC: "
start-stop-daemon --start --quiet --pidfile $PIDFILE \
- --exec $DAEMON -- $DAEMON_OPTS
+ --startas $DAEMON -- $DAEMON_OPTS
test -f $PIDFILE || sleep 1
if running ; then
echo "$NAME."
@@ -132,22 +134,21 @@
# just the same as "restart" except that it does nothing if the
# daemon isn't already running.
# check wether $DAEMON is running. If so, restart
- start-stop-daemon --stop --test --quiet --pidfile \
- /var/run/$NAME.pid --exec $DAEMON \
+ start-stop-daemon --stop --test --quiet --pidfile $PIDFILE \
+ --startas $DAEMON \
&& $0 restart \
|| exit 0
;;
restart)
echo -n "Restarting $DESC: "
- start-stop-daemon --stop --quiet --pidfile \
- /var/run/$NAME.pid --exec $DAEMON
+ start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
[ -n "$DODTIME" ] && sleep $DODTIME
- start-stop-daemon --start --quiet --pidfile \
- /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ --startas $DAEMON -- $DAEMON_OPTS
echo "$NAME."
;;
status)
- echo -n "$LABEL is "
+ echo -n "$NAME is "
if running ; then
echo "running"
else
diff -u supervisor-3.0a8/debian/changelog supervisor-3.0a8/debian/changelog
--- supervisor-3.0a8/debian/changelog
+++ supervisor-3.0a8/debian/changelog
@@ -1,3 +1,11 @@
+supervisor (3.0a8-1.1+deb7u1) wheezy; urgency=medium
+
+ * Non-maintainer upload.
+ * Apply init script from jessie/unstable to fix restart and
+ formating problems with the init script. (Closes: #609457)
+
+ -- Michael Prokop <mika@debian.org> Thu, 10 Jul 2014 16:28:58 +0200
+
supervisor (3.0a8-1.1) unstable; urgency=low
* Non-maintainer upload.
Reply to: