GNOME Bugzilla – Bug 743411
[review] support simple globbing in device spec such as unmanged-devices [th/spec-match-bgo743411]
Last modified: 2015-02-24 10:00:11 UTC
Please review...
th/spec-match-bgo743411 this branch obviously changes behavior in that it interprets some specs now differently. A major change is that interface-names are no longer compared case-insenstive
it would need also adjustments to keyfile and manual page... but let's see first if this approach is even desired.
I really want a way for *programs* that generate interfaces to have a way to easily tell NM to ignore them. See: https://bugzilla.gnome.org/show_bug.cgi?id=731014 Can we have these programs drop some sort of metadata associated with the in-kernel interface somehow? Alternatively a file in /run?
(In reply to comment #3) > I really want a way for *programs* that generate interfaces to have a way to > easily tell NM to ignore them. See: > > https://bugzilla.gnome.org/show_bug.cgi?id=731014 > > Can we have these programs drop some sort of metadata associated with the > in-kernel interface somehow? Alternatively a file in /run? I opened bug 743546 for this. These device-specs are used for 'ignore-carrier' and 'no-auto-default' and 'unmanged-devices'.
I like this. This actually fixes how I was expecting it to work already and what users were expecting. No objections to the code either, just please adjust the manual. (In reply to comment #4) > (In reply to comment #3) > > I really want a way for *programs* that generate interfaces to have a way to > > easily tell NM to ignore them. See: > > > > https://bugzilla.gnome.org/show_bug.cgi?id=731014 > > > > Can we have these programs drop some sort of metadata associated with the > > in-kernel interface somehow? Alternatively a file in /run? > > I opened bug 743546 for this. > > These device-specs are used for 'ignore-carrier' and 'no-auto-default' and > 'unmanged-devices'. Well, we'll hopefully add an udev property knob for the management status. I believe this is more of a bugfix of an existing interface than a feature enhancement. As for ignore-carrier, it seems to me that it belongs to the NMSettingConnection; just to assert that the connection will not go down upon carrier loss, there's not much use for disabling detection of carrier up (correct?).
(In reply to Lubomir Rintel from comment #5) > As for ignore-carrier, it seems to me that it belongs to the > NMSettingConnection carrier handling was originally done at the connection level (see bug 688284), but we changed it because there's no good way to make NMSettingConnection:ignore-carrier default to TRUE on servers and FALSE on desktops, etc, which is the use case we really needed.
Reworked and pushed. The last commit ("WIP: man: explain the format for dev...") would need some documentation skills.
*** Bug 744557 has been marked as a duplicate of this bug. ***
The additional '=...' feature for literal matching seems a bit superfluous as you can use 'eth[*][?]' to match a literal 'eth*?', unless I am missing something?
the globbing is implemented using GPatternSpec, which does not support ranges or escaping: https://developer.gnome.org/glib/stable/glib-Glob-style-pattern-matching.html#glib-Glob-style-pattern-matching.description
Branch looks OK to me as long as the docs get finished.
merged as http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=45155655f1c2d08ced88e8d8b9b97f1d36a55f2f