Package: spfmilter
Version: 1.99+0.95-4

The restart branch in /etc/init.d/spfmilter contains the same problem as
descriped in bug nr 290015. I modified the script, but i see, that the restart
doesn't work correctly, because sometimes, there a no spfmilter processes after
restart. If i raise the sleep time between stop and start, then the restart
process is working. In my attached patch, i create a loop testing the pid file.
There could be one error situation: stopping the spfmilter and the pid file will
not be removed.

Regards
Herbert Straub


diff -u /etc/init.d/spfmilter.ORIG /etc/init.d/spfmilter
--- /etc/init.d/spfmilter.ORIG  2005-01-24 07:31:51.000000000 +0100
+++ /etc/init.d/spfmilter       2005-01-24 07:38:29.000000000 +0100
@@ -34,15 +34,17 @@
   stop)
        echo -n "Stopping $DESC: "
        start-stop-daemon --stop --exec $DAEMON
+       while ( [ -e $RUNDIR/$NAME.pid ] ); do
+               echo "sleeping 1 second"
+               sleep 1
+       done
+
        echo "$NAME."
        ;;
   restart|force-reload)
        echo -n "Restarting $DESC: "
-       start-stop-daemon --stop --exec $DAEMON
-       sleep 1
-       start-stop-daemon --start --quiet --exec $DAEMON -- \
-               --user $USER --pidfile $RUNDIR/$NAME.pid \
-               $DAEMON_OPTS $RUNDIR/$NAME.sock
+       $0 stop
+       $0 start
        echo "$NAME."
        ;;
   *)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to