netplug: prevent starting multiple instances of netplugd
authorCarlos Santos <casantos@datacom.com.br>
Thu, 7 Jun 2018 01:36:41 +0000 (22:36 -0300)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 7 Jun 2018 14:03:33 +0000 (16:03 +0200)
commit3c6a5bdd3ed94f97afe2db9123d7117f85f654ce
treea0dab46f5e985a389b416588de5fb84d60613330
parent41a365d40bf8f391a9af2ac9c7a18bfff97f35f9
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

Reported-by: Joachim Krueger <mail2k@web.de>
Signed-off-by: Carlos Santos <casantos@datacom.com.br>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/netplug/S29netplug