mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 14:30:09 +01:00
ifcfg-rh: suppress warning about NM_CONTROLLED=no without restricting profile to device
NM_CONTROLLED=no has the primary use of marking devices as unmanaged.
For that to work, the ifcfg file must contain either a MAC address,
an interface-name, or s390-subchannels that match a device.
In case the profile doesn't contain such specifiers, the profile
is ignored and a warning was logged:
<warn> [1522849679.7866] ifcfg-rh: loading "/etc/sysconfig/network-scripts/ifcfg-ens99" fails: NM_CONTROLLED was false but device was not uniquely identified; device will be managed
Downgrade this warning to a debug message. It's not unreasonable
that a user marks a ifcfg file with NM_CONTROLLED=no, to avoid
NetworkManager handling it. Yes, that way, the user did not explicitly
mark a device as unmanaged. But NetworkManager will ignore the profile,
as the user might resonably desire. No need to warn about that.
This commit is contained in:
parent
95d24929aa
commit
3f969d3b5b
1 changed files with 1 additions and 0 deletions
|
|
@ -5344,6 +5344,7 @@ connection_from_file_full (const char *filename,
|
|||
if (!svGetValueBoolean (parsed, "NM_CONTROLLED", TRUE)) {
|
||||
connection = create_unhandled_connection (filename, parsed, "unmanaged", out_unhandled);
|
||||
if (!connection) {
|
||||
NM_SET_OUT (out_ignore_error, TRUE);
|
||||
g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_FAILED,
|
||||
"NM_CONTROLLED was false but device was not uniquely identified; device will be managed");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue