On Sun, Sep 12, 2010 at 14:52:44 +0200, gregor herrmann wrote:
> diff -u chrony-1.24/debian/init.d chrony-1.24/debian/init.d
> --- chrony-1.24/debian/init.d
> +++ chrony-1.24/debian/init.d
> @@ -51,9 +51,16 @@
>
> case "$1" in
> start)
> - start-stop-daemon --start --verbose --exec $DAEMON || { echo "$DAEMON
> already running."; exit 1; }
> - /bin/pidof $DAEMON > /dev/null || { echo "$DAEMON failed to start.";
> exit 1; }
> - putonline
> + start-stop-daemon --start --verbose --exec $DAEMON
> + case "$?" in
> + 0|1) # daemon successfully started or already running
> + putonline
> + ;;
> + 2) # daemon could not be started
> + echo "$DAEMON failed to start."
> + exit 1
> + ;;
> + esac
> ;;
> stop)
> start-stop-daemon --stop --verbose --oknodo --exec $DAEMON
> @@ -64,8 +71,16 @@
> start-stop-daemon --stop --quiet --exec $DAEMON
> sleep 1
> start-stop-daemon --start --quiet --exec $DAEMON -- -r
> - /bin/pidof $DAEMON > /dev/null || { echo "$DAEMON failed to restart.";
> rm -f /var/run/chrony-ppp-up; exit 1; }
> - putonline
> + case "$?" in
> + 0|1) # daemon successfully started or still running
> + putonline
> + ;;
> + 2) # daemon could not be started
> + echo "$DAEMON failed to restart."
> + rm -f /var/run/chrony-ppp-up
> + exit 1
> + ;;
> + esac
> ;;
> *)
> echo "Usage: /etc/init.d/chrony {start|stop|restart|force-reload}"Any reason you're not using start-stop-daemon --oknodo? Cheers, Julien
signature.asc
Description: Digital signature

