Bug 10661 - /etc/init.d/S29netplug starts multiple instances of netplugd
Summary: /etc/init.d/S29netplug starts multiple instances of netplugd
Status: CLOSED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2017.11.2
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: Carlos Santos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-22 12:48 UTC by mail2k
Modified: 2018-06-21 18:07 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mail2k 2018-01-22 12:48:24 UTC
If you execute the command "/etc/init.d/S29netplug start" multiple times, you get multiple instances of netplugd. 
This is not the desired behaviour. We should only have one running netplugd.

The change has to be made in  package/netplug/S29netplug:
line 46:
-	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}

Reason: 
If the start-stop-daemon gets the parameter -p /var/run/netplug.pid it will try to identify a running process by this pid-file but the file doesn't exist. As a result, every call of  "/etc/init.d/S29netplug start" starts a new netplugd.

--> The parameter -p /var/run/netplug.pid must be passed to netplugd.
Comment 1 Carlos Santos 2018-06-06 16:35:18 UTC
I'm taking this.
Comment 2 Carlos Santos 2018-06-07 01:39:27 UTC
Patch submitted: https://patchwork.ozlabs.org/patch/926080/
Comment 3 Carlos Santos 2018-06-07 14:21:53 UTC
(In reply to Carlos Santos from comment #2)

Applied to master (commit 3c6a5bdd3ed94f97afe2db9123d7117f85f654ce). Please test it and change the bug status to VERIFIED on success; otherwise report additional findings and change the status to REOPENED.
Comment 4 Carlos Santos 2018-06-18 11:07:40 UTC
Closing, since the OP did not answer and nobody reported regressions.
Comment 5 mail2k 2018-06-21 18:07:44 UTC
Sorry for answering so late. I was offline for a while.
Thank you for fixing the bug.
Works perfect now.