ifcfg: downgrade warning about NM_CONTROLLED=no

NM_CONTROLLED=no is an explicit user configuration. There is no point in
issuing a warning that the user doesn't want to manage a device.

   <warn>  [1467722628.7388] ifcfg-rh: Ignoring connection /etc/sysconfig/network-scripts/ifcfg-eth0 (5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03,"System eth0") / device 'eth0' due to NM_CONTROLLED=no.

Also, don't truncate the device spec, instead show the full
device spec, it may contains a MAC address or a s390 subchannel.
This commit is contained in:
Thomas Haller
2016-07-05 14:51:05 +02:00
parent 87169e681a
commit e81d4f2b64
2 changed files with 5 additions and 13 deletions

View File

@@ -363,17 +363,9 @@ update_connection (SettingsPluginIfcfg *self,
self); self);
if (nm_ifcfg_connection_get_unmanaged_spec (connection_new)) { if (nm_ifcfg_connection_get_unmanaged_spec (connection_new)) {
const char *spec; _LOGI ("Ignoring connection "NM_IFCFG_CONNECTION_LOG_FMT" due to NM_CONTROLLED=no. Unmanaged: %s.",
const char *device_id; NM_IFCFG_CONNECTION_LOG_ARG (connection_new),
nm_ifcfg_connection_get_unmanaged_spec (connection_new));
spec = nm_ifcfg_connection_get_unmanaged_spec (connection_new);
device_id = strchr (spec, ':');
if (device_id)
device_id++;
else
device_id = spec;
_LOGW ("Ignoring connection "NM_IFCFG_CONNECTION_LOG_FMT" / device '%s' due to NM_CONTROLLED=no.",
NM_IFCFG_CONNECTION_LOG_ARG (connection_new), device_id);
} else if (nm_ifcfg_connection_get_unrecognized_spec (connection_new)) } else if (nm_ifcfg_connection_get_unrecognized_spec (connection_new))
_LOGW ("Ignoring connection "NM_IFCFG_CONNECTION_LOG_FMT" of unrecognized type.", NM_IFCFG_CONNECTION_LOG_ARG (connection_new)); _LOGW ("Ignoring connection "NM_IFCFG_CONNECTION_LOG_FMT" of unrecognized type.", NM_IFCFG_CONNECTION_LOG_ARG (connection_new));