From e81d4f2b643fe99fb480ef4398add115c4f991ea Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 5 Jul 2016 14:51:05 +0200 Subject: [PATCH] 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. [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. --- .../plugins/ifcfg-rh/nm-ifcfg-connection.c | 4 ++-- src/settings/plugins/ifcfg-rh/plugin.c | 14 +++----------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c b/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c index 3efd99a4c5..82f2059854 100644 --- a/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c +++ b/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c @@ -470,7 +470,7 @@ nm_ifcfg_connection_init (NMIfcfgConnection *connection) static void set_property (GObject *object, guint prop_id, - const GValue *value, GParamSpec *pspec) + const GValue *value, GParamSpec *pspec) { NMIfcfgConnectionPrivate *priv = NM_IFCFG_CONNECTION_GET_PRIVATE (object); @@ -489,7 +489,7 @@ set_property (GObject *object, guint prop_id, static void get_property (GObject *object, guint prop_id, - GValue *value, GParamSpec *pspec) + GValue *value, GParamSpec *pspec) { NMIfcfgConnectionPrivate *priv = NM_IFCFG_CONNECTION_GET_PRIVATE (object); diff --git a/src/settings/plugins/ifcfg-rh/plugin.c b/src/settings/plugins/ifcfg-rh/plugin.c index 02c408957b..c2956d22b7 100644 --- a/src/settings/plugins/ifcfg-rh/plugin.c +++ b/src/settings/plugins/ifcfg-rh/plugin.c @@ -363,17 +363,9 @@ update_connection (SettingsPluginIfcfg *self, self); if (nm_ifcfg_connection_get_unmanaged_spec (connection_new)) { - const char *spec; - const char *device_id; - - 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); + _LOGI ("Ignoring connection "NM_IFCFG_CONNECTION_LOG_FMT" due to NM_CONTROLLED=no. Unmanaged: %s.", + NM_IFCFG_CONNECTION_LOG_ARG (connection_new), + nm_ifcfg_connection_get_unmanaged_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));