[Pkg-utopia-maintainers] Bug#743138: Bug#743138: Bug#743138: Bug#743138: [Needs upstream 0.9.10 release] Please only enable ifupdown plugin when ifupdown installed

Michael Biebl biebl at debian.org
Wed Feb 27 09:51:35 GMT 2019


Am 27.02.19 um 08:09 schrieb Guus Sliepen:
> 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.

If the idea is to load and run less code in NM, this would mean we have
to add more. So at a first glance this doesn't look very compelling.


Also, if we wanted to find devices which should not be touched by NM
because they are defined in /e/n/i, is ifquery really sufficient to do that?
Say I have a br0 and eth0 in bridge_ports.
What will ifquery eth0 return in such a case?

Personally, I've never been a fan of the ifupdown plugin in NM. Parsing
the /e/n/i file is hairy and incomplete.
Especially the managed=true mode is something I would like to get rid off.
If we removed managed=true mode, all that would remain from the ifupdown
plugin is to mark devices as unmanaged by NM if they are defined in
/e/n/i. In such a case we might consider replacing the handwritten
parser and just exec ifquery.
Maybe this could even be replaced by a udev rule which runs ifquery and
sets ENV{NM_UNMANAGED}='1'

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-utopia-maintainers/attachments/20190227/8de8cd4c/attachment.sig>


More information about the Pkg-utopia-maintainers mailing list