On Sun, Dec 27, 2015 at 08:58:32PM +0100, Martin Pitt wrote: > for historical reasons the udev package has shipped the functionality > for handling network device hotplug events. However, it's a bit weird > to ship the coldplugging parts (/etc/init.d/networking and > networking.service) in ifupdown, but not the hotplugging ones. It > would be more consistent to ship both in ifupdown and also make it > easier to do changes. Of course the systemd packagers are still happy > to discuss changes to the udev bits and provide guidance.
That's totally fine with me. > This involves three parts: > > * An udev rule which reacts to adding or removing network devices. > This is currently shipped as /lib/udev/rules.d/80-networking.rules > but I propose that ifupdown ships it as > /lib/udev/rules.d/80-ifupdown.rules to avoid a package file > conflict and also to make it clearer that this applies to ifupdown > only. I attach this as 80-ifupdown.rules. I think we can also keep it as it is and use Replaces and Breaks headers in the control file. Each has its drawbacks. If there is both 80-networking.rules and 80-ifupdown.rules, it seems to me like the ifupdown script will be called twice for each hotplug event. But I agree it will be clearer if it is called 80-ifupdown.rules. > * The above rule just calls an udev helper script "ifupdown" which > needs to be put into /lib/udev/. This does the actual work of > calling either ifup $IFACE directly (under SysV init or upstart) or > a systemd unit "ifup@IFACE.service" under systemd. The latter is > necessary as udev rules must not start long-running programs (ifup > can take quite long), and it also provides much nicer and cleaner > logging, a proper shutdown order, etc. > > I attach this as "ifupdown". Ok, that's basically just a copy of /lib/udev/net.agent. Why was /lib/udev/hotplug.functions pasted into it instead of sourced? Or is this just a difference between the Ubuntu and Debian version of the udev package? > * The ifup@.service helper unit. This should go into > > `pkg-config --variable=systemdsystemunitdir systemd` > > aka /lib/systemd/system/. It does not need to be enabled in any way > as the above udev helper rule will start/stop it. > > Note that this will file-conflict with udev with this name, so > if/once you accept this we'll need to remove the above bits from > udev and add a Breaks:/Replaces: to ifupdown and a Breaks: to udev. Ok, so we'll have a file conflict in any case. I can do this in the next release of ifupdown (0.8.5). I'll need to know which version of the udev package to sync with. -- Met vriendelijke groet / with kind regards, Guus Sliepen <g...@debian.org>
signature.asc
Description: Digital signature