From e0fb3125f9bed7dd0bd797224c4d6983eec0be15 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 7 Dec 2009 12:44:21 -0800 Subject: [PATCH] ifcfg-rh: warn when device will be managed due to missing HWADDR (rh #545003) --- system-settings/plugins/ifcfg-rh/reader.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/system-settings/plugins/ifcfg-rh/reader.c b/system-settings/plugins/ifcfg-rh/reader.c index a23459b726..9a628213c9 100644 --- a/system-settings/plugins/ifcfg-rh/reader.c +++ b/system-settings/plugins/ifcfg-rh/reader.c @@ -1851,6 +1851,11 @@ make_wireless_setting (shvarFile *ifcfg, } g_byte_array_free (array, TRUE); + } else if (!nm_controlled) { + /* If NM_CONTROLLED=no but there wasn't a MAC address, notify + * the user that the device cannot be unmanaged. + */ + PLUGIN_WARN (IFCFG_PLUGIN_NAME, " warning: NM_CONTROLLED was false but HWADDR was missing; device will be managed"); } } else { g_object_unref (s_wireless); @@ -2138,6 +2143,11 @@ make_wired_setting (shvarFile *ifcfg, } g_byte_array_free (mac, TRUE); + } else if (!nm_controlled) { + /* If NM_CONTROLLED=no but there wasn't a MAC address, notify + * the user that the device cannot be unmanaged. + */ + PLUGIN_WARN (IFCFG_PLUGIN_NAME, " warning: NM_CONTROLLED was false but HWADDR was missing; device will be managed"); } } else { g_object_unref (s_wired);