The problem is that linux-igd forks itself into the background so
the initscript does not know the final pid.  Even though you can tell
start-stop-daemon to create a pidfile, it doesn't contain the pid of
the running daemon.

Possibly you could edit the initscript something like this:

function start
{
        [ "$ALLOW_MULTICAST" == "yes" ] && ip route add 224.0.0.0/4 dev 
$INTIFACE > /dev/null 2>&1 || true
+        start-stop-daemon --start --quiet $RUN_OPTS \
                --exec $DAEMON -- "$EXTIFACE" "$INTIFACE" \
         && pidof upnpd > /var/run/linux-igd.pid
}

Note the extra \ on the end of the -exec line which makes the pidof
conditional on a successful start.

This works (on my system anyway), because the daemon does not return until
it has created its background process.  Perhaps you could give it a try.

For neatness you might want to add "rm -f /var/run/linux-igd.pid" in
the stop function also.

I will try to add a pid function to the initscripts in the next release.

Nick



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to