From b7f8b8f800ff153958e399772d6bcf24451cd850 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 27 Aug 2008 19:43:15 +0000 Subject: [PATCH] 2008-08-27 Dan Williams * system-settings/plugins/ifcfg-fedora/reader.c - (make_ip4_setting): use DOMAIN not SEARCH (rh #459370) git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4022 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- ChangeLog | 5 +++++ system-settings/plugins/ifcfg-fedora/reader.c | 19 ++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 898a8404c6..52c0db7a94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-08-27 Dan Williams + + * system-settings/plugins/ifcfg-fedora/reader.c + - (make_ip4_setting): use DOMAIN not SEARCH (rh #459370) + 2008-08-27 Dan Williams Ensure zombie children get cleaned up. To get notifications when children diff --git a/system-settings/plugins/ifcfg-fedora/reader.c b/system-settings/plugins/ifcfg-fedora/reader.c index 61f363723b..9e2a2065ec 100644 --- a/system-settings/plugins/ifcfg-fedora/reader.c +++ b/system-settings/plugins/ifcfg-fedora/reader.c @@ -269,7 +269,7 @@ make_ip4_setting (shvarFile *ifcfg, GError **error) } /* DNS searches */ - value = svGetValue (ifcfg, "SEARCH"); + value = svGetValue (ifcfg, "DOMAIN"); if (value) { char **searches = NULL; @@ -283,6 +283,23 @@ make_ip4_setting (shvarFile *ifcfg, GError **error) g_free (value); } + /* Legacy value NM used for a while but is incorrect (rh #459370) */ + if (!g_slist_length (s_ip4->dns_search)) { + value = svGetValue (ifcfg, "SEARCH"); + if (value) { + char **searches = NULL; + + searches = g_strsplit (value, " ", 0); + if (searches) { + char **item; + for (item = searches; *item; item++) + s_ip4->dns_search = g_slist_append (s_ip4->dns_search, *item); + g_free (searches); + } + g_free (value); + } + } + return NM_SETTING (s_ip4); error: