Hi again,

Axel Beckert wrote:
> the following patch works for me:

Unfortunately only start and stop work with that patch, but restart
does not work. :-/

Here's a bigger, but fully working patch -- with a different strategy:

--- /etc/init.d/kerneloops.backup       2015-11-14 19:35:37.000000000 +0100
+++ /etc/init.d/kerneloops      2016-06-10 00:13:24.356604992 +0200
@@ -19,6 +19,7 @@
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 DESC="Kernel crash collector"
 NAME=kerneloops
+DAEMON_ARGS=--nodaemon
 DAEMON=/usr/sbin/$NAME
 PIDFILE=/var/run/$NAME.pid
 SCRIPTNAME=/etc/init.d/$NAME
@@ -46,12 +47,11 @@
        #   0 if daemon has been started
        #   1 if daemon was already running
        #   2 if daemon could not be started
-       start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON 
--test > /dev/null \
+       start-stop-daemon --start --quiet --make-pidfile --pidfile $PIDFILE 
--exec $DAEMON --background --test > /dev/null \
                || return 1
-       start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+       start-stop-daemon --start --quiet --make-pidfile --pidfile $PIDFILE 
--exec $DAEMON --background -- \
                $DAEMON_ARGS \
                || return 2
-       pidofproc $DAEMON > $PIDFILE
 }
 
 #

                Regards, Axel
-- 
 ,''`.  |  Axel Beckert <[email protected]>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE

Reply via email to