On Tue, Feb 26, 2019 at 10:37:28PM +0100, Michael Biebl wrote:

> >> Andrej, I'm fine with dropping ifupdown from the default NM
> >> configuration if the ifupdown package is going to ship such a config
> >> snippet for NM.
> > 
> > Are we talking about /etc/NetworkManager/dispatcher.d/01-ifupdown here?
> > It seems like a hack to avoid having to update some packages to directly
> > support NetworkManager. For the long run, it's probably better if we
> > don't have this dependence on scripts written for ifupdown.
> 
> No, we are talking about the ifupdown plugin in NM, i.e.
> /usr/lib/*/NetworkManager/1.14.6/libnm-settings-plugin-ifupdown.so
> 
> which is responsible for parsing /etc/network/interfaces (and depending
> on whether managed=true or false, simply ignores interfaces configured
> in /e/n/i or tries to apply the configuration set there)

Ah, OK.

> ifupdown could ship the file as /etc/NetworkManager/conf.d/ifupdown.conf
> This would have the downside, that the ifupdown plugin would still be
> active if the ifupdown package is removed, but not purged.

But it could just check for /sbin/ifup being executable before
continuing, just like init scripts do. Even better, the plugin could
just call system("/sbin/ifquery <iface name>") to check whether an
interface is managed by ifupdown or not. If the return value is 0, it
means it's managed. If it's anything else, either ifupdown is not
installed or it is but that interface is not known to ifupdown.

-- 
Met vriendelijke groet / with kind regards,
      Guus Sliepen <g...@debian.org>

Attachment: signature.asc
Description: PGP signature

Reply via email to