summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-11-13 20:06:14 +0100
committerThomas Haller <thaller@redhat.com>2014-11-13 20:10:07 +0100
commit125f7c4d40b7048209d031b3322e46e081d7c328 (patch)
tree07c0d6c8b3e26194260cc763037b71266f37af99
parentae829a88cef3eb8d050180a3783cd11657d89d82 (diff)
downloadNetworkManager-125f7c4d40b7048209d031b3322e46e081d7c328.tar.gz
dhcp: log the configured DHCP client
Also move enumerating the installed DHCP plugins to the beginning of nm_dhcp_manager_init(). Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r--src/dhcp-manager/nm-dhcp-manager.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/dhcp-manager/nm-dhcp-manager.c b/src/dhcp-manager/nm-dhcp-manager.c
index 419bdafbcb..70372c90d8 100644
--- a/src/dhcp-manager/nm-dhcp-manager.c
+++ b/src/dhcp-manager/nm-dhcp-manager.c
@@ -389,6 +389,13 @@ nm_dhcp_manager_init (NMDhcpManager *self)
GError *error = NULL;
GSList *iter;
+ for (iter = client_descs; iter; iter = iter->next) {
+ ClientDesc *desc = iter->data;
+
+ nm_log_dbg (LOGD_DHCP, "Registered DHCP client '%s' (%s)",
+ desc->name, g_type_name (desc->gtype));
+ }
+
/* Client-specific setup */
client = nm_config_get_dhcp_client (config);
if (nm_config_get_configure_and_quit (config)) {
@@ -401,20 +408,15 @@ nm_dhcp_manager_init (NMDhcpManager *self)
if (priv->client_type == G_TYPE_INVALID) {
nm_log_warn (LOGD_DHCP, "No usable DHCP client found (%s)! DHCP configurations will fail.",
error->message);
+ } else {
+ nm_log_dbg (LOGD_DHCP, "Using DHCP client '%s'", find_client_desc (NULL, priv->client_type)->name);
+
}
g_clear_error (&error);
priv->clients = g_hash_table_new_full (g_direct_hash, g_direct_equal,
NULL,
(GDestroyNotify) g_object_unref);
- g_assert (priv->clients);
-
- for (iter = client_descs; iter; iter = iter->next) {
- ClientDesc *desc = iter->data;
-
- nm_log_dbg (LOGD_DHCP, "Registered DHCP client '%s' (%s)",
- desc->name, g_type_name (desc->gtype));
- }
}
static void