summaryrefslogtreecommitdiff
path: root/src/settings/plugins/ifnet/net_utils.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2013-03-12 13:14:54 -0400
committerDan Winship <danw@gnome.org>2013-04-03 10:23:48 -0400
commit0186330a4bd5fed46cde5814c263db97ad717afb (patch)
treecb967d1aa2cdaf7816805c9b6be4deed352768ff /src/settings/plugins/ifnet/net_utils.c
parent57b0ed415440c6f5457e92b9048bfe1d46d7346b (diff)
downloadNetworkManager-0186330a4bd5fed46cde5814c263db97ad717afb.tar.gz
settings: use NMConfig directly rather than reparsing NetworkManager.conf
Add some new API to NMConfig so that NMSettings and its plugins can use NMConfig to look up values rather than reparsing the config file themselves. Also, move the no-auto-default cache from NetworkManager.conf to $NMSTATEDIR/no-auto-default.state, so NM isn't rewriting its own config file at runtime.
Diffstat (limited to 'src/settings/plugins/ifnet/net_utils.c')
-rw-r--r--src/settings/plugins/ifnet/net_utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/settings/plugins/ifnet/net_utils.c b/src/settings/plugins/ifnet/net_utils.c
index c2e3a376aa..ae2307f913 100644
--- a/src/settings/plugins/ifnet/net_utils.c
+++ b/src/settings/plugins/ifnet/net_utils.c
@@ -25,6 +25,7 @@
#include <errno.h>
#include <nm-utils.h>
#include <nm-system-config-interface.h>
+#include <nm-config.h>
#include <gio/gio.h>
#include "net_utils.h"
#include "wpa_parser.h"
@@ -800,7 +801,7 @@ get_dhcp_hostname_and_client_id (char **hostname, char **client_id)
*hostname = NULL;
*client_id = NULL;
- dhcp_client = ifnet_get_global_setting ("main", "dhcp");
+ dhcp_client = nm_config_get_dhcp_client (nm_config_get ());
if (dhcp_client) {
if (!strcmp (dhcp_client, "dhclient"))
g_file_get_contents (dhclient_conf, &contents, NULL,