Gentoo Archives: gentoo-user

From: Kai Krakow <hurikhan77@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: Problem with openrc-0.18.4 and ifplugd
Date: Tue, 22 Dec 2015 14:20:58
Message-Id: 20151222152026.5162b855@jupiter.sol.kaishome.de
In Reply to: Re: [gentoo-user] Re: Problem with openrc-0.18.4 and ifplugd by Mick
1 Am Tue, 22 Dec 2015 14:04:12 +0000
2 schrieb Mick <michaelkintzios@×××××.com>:
3
4 > On Tuesday 22 Dec 2015 01:12:10 Kai Krakow wrote:
5 > > Am Tue, 22 Dec 2015 00:54:35 +0000
6 > >
7 > > schrieb Mick <michaelkintzios@×××××.com>:
8 > > > On Tuesday 22 Dec 2015 00:48:13 Neil Bothwick wrote:
9 > > > > On Mon, 21 Dec 2015 23:55:06 +0000, Mick wrote:
10 > > > > > > Are you trying to run ifplugd from its init script? It's not
11 > > > > > > meant to be used like that with openrc.
12 > > > > >
13 > > > > > I don't have any init scripts for ifplugd. I wondered what
14 > > > > > starts it/stops it, and found /lib64/netifrc/net/ifplugd.sh
15 > > > >
16 > > > > It should be started by the net.eth* scripts, so you need to
17 > > > > start the network interface first.
18 > > >
19 > > > Thanks again Neil. I don't think this is as you suggest. I never
20 > > > had wired or wireless interfaces enabled to start at boot time,
21 > > > because ifplugd started them up as necessary.
22 > > >
23 > > > From the README file:
24 > > > The network interface which is controlled by ifplugd should
25 > > > not be configured automatically by your distribution's network
26 > > > subsystem, since ifplugd will do this for you if needed.
27 > >
28 > > But that doesn't apply here because the "net.* plugin" starts
29 > > ifplugd, and defers further initializations until ifplugd detects a
30 > > link.
31 > >
32 > > This is what I meant when I talked about pushing ifplugd further
33 > > down the layer. I just didn't remember that this is now solved by a
34 > > plugin in net.* itself.
35 > >
36 > > Don't enable ifplugd service. Openrc will do its magic.
37 >
38 > There is no means of enabling or disabling the ifplugd service that I
39 > have found, because there is no /etc/init.d/ifplugd script. Once
40 > installed ifplugd always starts at boot and daemonizes, configuring
41 > or tearing down connections as a link is detected or lost.
42
43 As far as I understood, you now start ifplugd using the associated
44 net.* init script. Openrc will detect that ifplugd is installed and
45 then wait until a cable is plugged, plus starting an instance listening
46 on the device.
47
48 > To make it clearer, this is how it used to work on two laptops:
49 >
50 > I install ifplugd and remove from rc-update any net.<iface> that I
51 > have configured. ifplugd will always start at boot as a daemon and
52 > will bring up and configure the wired NIC once a cable is detected.
53 > There is no start up script in /etc/init.d/ installed by default,
54 > although the man page mentions it, along
55 > with /etc/ifplugd/ifplugd.conf, which is also not installed. This is
56 > the only file that installed on my systems:
57 >
58 > # find /etc -iname *ifplug*
59 > /etc/ifplugd
60 > /etc/ifplugd/ifplugd.action
61
62 Its clear how it used to work but I think the semantics changed. Since
63 I do no longer use openrc I cannot confirm how the rest of the services
64 react to and activated net.* init script if ifplugd is active through
65 the plugin. I suppose dependent scripts should only be triggered after
66 the cable is plugged in.
67
68 This is also why there is no config file: Its configured dynamically
69 through the plugin and the interface specific init script.
70
71 > I started this thread because recently I have to start my wired
72 > interface manually, after which point ipfplugd also starts,
73 > daemonizes and manages the connection. This is not how it used to
74 > work - I never had to start the wired interface myself.
75
76 This is how it works now: ifplugd is started through the interface
77 script.
78
79 You may need to start and stop network dependent service through
80 ifplugd.action instead of enabling them statically through openrc. But
81 again: I'm not sure about it. It may be worth a try.
82
83 > Furthermore, starting ifplugd on a terminal now shows that it is
84 > listening on eth0 instead of enp11s0, but hadn't tried this before
85 > things broke. According to the man page eth0 is the default, but I
86 > can't recall manually specifying a different interface for ifplugd in
87 > the past. It always brought up the wired interface, no matter what
88 > it was called.
89
90 This is due to its defaults mentioned in the man page: It defaults to
91 eth0. Gentoo no longer installs a config file.
92
93
94 --
95 Regards,
96 Kai
97
98 Replies to list-only preferred.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Re: Problem with openrc-0.18.4 and ifplugd Mick <michaelkintzios@×××××.com>