-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, Jan 05, 2017 at 10:07:59AM +0100, Nicolas George wrote: > Le quintidi 15 nivôse, an CCXXV, Stefan Monnier a écrit : > > Is there something better? Like a predefined way to just say that when > > `usb0` appears, it should be added to `br0` (and ideally, this would > > also `ifup` the `br0` interface if it's not up yet). > > Not with /etc/network/interfaces and ifupdown, but udev can do all that.
I always thought this is a division of labor between udev (generating a "hotplug event", like "eth0 link went just up" and ifupdown, declaring what has to happen (cf. the "allow-hotplug" directive). But I must admit I never looked to deeply into that to be authoritative. The docs [1] seem to suggest that, though. Of course, udev would be involved for other network management systems too, like NM: ideally, udev just dispatches and normalizes kernel events and delegates to specialized subsystems. In a pinch you can just sneak a complete shell script in an udev rule (and I'm guilty of having done such a thing [2]), but doing this as "system architecture" might lead to madness :-) [1] https://www.debian.org/doc/manuals/debian-reference/ch05.en.html [2] Once, for a customer: inserting the right storage medium (with the right UUID) triggered a system backup. regards - -- t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlhuEdwACgkQBcgs9XrR2kZtowCfb0Glm/fJD9ByArT9nkGMmh4L 7NkAn2L0r4w7NeYa4E7PgK1BguWM7oZK =VqAG -----END PGP SIGNATURE-----