Hi Philipp,

On Saturday 22 March 2008 12:53, you wrote:
> Then please depend on psmisc.  Your method is *not* reliable.  It
> depends on the PID sequence number.  You are using a shell script and
> invoke `ps aux | grep $DAEMON' which means that $DAEMON will appear
> as part of the cmdline of the grep invokation.  If the $DAEMON PID
> is lower than the grep it will be written to the pid file, otherwise
> the PID of the grep process will be written.

yes ... you are true, but /bin/pidof from sysvinit-utils (which is required 
and needs no additional depends) should solve this issue, shouldn't it?

With kind regards, Jan.
diff -Nru /tmp/shLGW6Hvfe/dns-flood-detector-1.12/debian/changelog /tmp/urmfazEcrm/dns-flood-detector-1.12/debian/changelog
--- /tmp/shLGW6Hvfe/dns-flood-detector-1.12/debian/changelog	2008-03-22 17:47:38.000000000 +0100
+++ /tmp/urmfazEcrm/dns-flood-detector-1.12/debian/changelog	2008-03-22 17:47:38.000000000 +0100
@@ -1,3 +1,9 @@
+dns-flood-detector (1.12-1etch1) stable; urgency=low
+
+  * make start-stop-daemon working instead of using kill (Closes: #431676).
+
+ -- Jan Wagner <[EMAIL PROTECTED]>  Fri, 21 Mar 2008 17:21:51 +0100
+
 dns-flood-detector (1.12-1) unstable; urgency=medium
 
   * New upstream release
diff -Nru /tmp/shLGW6Hvfe/dns-flood-detector-1.12/debian/init.d /tmp/urmfazEcrm/dns-flood-detector-1.12/debian/init.d
--- /tmp/shLGW6Hvfe/dns-flood-detector-1.12/debian/init.d	2008-03-22 17:47:38.000000000 +0100
+++ /tmp/urmfazEcrm/dns-flood-detector-1.12/debian/init.d	2008-03-22 17:47:38.000000000 +0100
@@ -35,23 +35,22 @@
 	echo -n "Starting $DESC: "
 	start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
 		--exec $DAEMON -- $DAEMON_OPTS
+	/bin/pidof $DAEMON > /var/run/$NAME.pid
 	echo "$NAME."
 	;;
   stop)
 	echo -n "Stopping $DESC: "
 	start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
 		--exec $DAEMON
-	killall -9 $NAME
 	echo "$NAME."
 	;;
   restart|force-reload)
 	echo -n "Restarting $DESC: "
 	start-stop-daemon --stop --quiet --pidfile \
 		/var/run/$NAME.pid --exec $DAEMON
-	killall -9 $NAME
-	sleep 1
 	start-stop-daemon --start --quiet --pidfile \
 		/var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
+	/bin/pidof $DAEMON > /var/run/$NAME.pid
 	echo "$NAME."
 	;;
   *)

Attachment: pgprCGejKOsPf.pgp
Description: PGP signature

Reply via email to