netplug: prevent starting multiple instances of netplugd
PATCH 1/1 netplug: prevent starting multiple instances of netplugd
Executing "/etc/init.d/S29netplug start" multiple times resulted in multiple instances of netplugd.
Pass "-p /var/run/netplug.pid" to netplugd, so it creates the PID file that start-stop-daemon needs to know that netplugd is already running. Also use the pid file to stop netplugd, instead of the daemon name.
Fixes https://bugs.busybox.net/show_bug.cgi?id=10661
--- package/netplug/S29netplug | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/netplug/S29netplug +2 -2
@@ -41,7 +41,7 @@ case "$1" in start) # Start daemon. printf "Starting network plug daemon: " - start-stop-daemon -S -q -p /var/run/netplugd.pid -x /sbin/netplugd ${NETPLUGDARGS} + start-stop-daemon -S -q -x /sbin/netplugd -- -p /var/run/netplugd.pid ${NETPLUGDARGS} RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/netplugd
@@ -49,7 +49,7 @@ case "$1" in stop) # Stop daemon. printf "Shutting down network plug daemon: " - start-stop-daemon -K -n netplugd + start-stop-daemon -K -q -p /var/run/netplugd.pid RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/netplugd
Signature · 1 line
2.17.0
Thomas Petazzoni
AppliedPATCH 1/1 netplug: prevent starting multiple instances of netplugd
Hello,
Quoted 7 lines · Carlos Santos
Executing "
/etc/init.d/S29netplugstart" multiple times resulted in multiple instances of netplugd.Pass "-p
/var/run/netplug.pid" to netplugd, so it creates the PID file that start-stop-daemon needs to know that netplugd is already running. Also use the pid file to stop netplugd, instead of the daemon name.
Quoted 7 lines
Fixes https://bugs.busybox.net/show_bug.cgi?id=10661
Reported-by Joachim Krueger <[email protected]>Signed-off-by Carlos Santos <[email protected]>--- package/netplug/S29netplug | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 netplug: prevent starting multiple instances of netplugd
In reply to Carlos SantosQuoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Carlos" == Carlos Santos <[email protected]> writes:
Executing "
/etc/init.d/S29netplugstart" multiple times resulted in multiple instances of netplugd.
Quoted 8 lines
Pass "-p
/var/run/netplug.pid" to netplugd, so it creates the PID file that start-stop-daemon needs to know that netplugd is already running. Also use the pid file to stop netplugd, instead of the daemon name.Fixes https://bugs.busybox.net/show_bug.cgi?id=10661
Reported-by Joachim Krueger <[email protected]>Signed-off-by Carlos Santos <[email protected]>
Committed to 2018.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard