settings: call dispatcher when setting hostname with systemd

Now that we set hostname with systemd, call dispatcher in nm-settings.c.
gethostname() in nm-policy.c already sees the new hostname.

Fixes: 6dc35e66d4
Fixes: 6c3d71c431
Fixes:Beaker:NetworkManager_Test44_dispatcher_hostname
This commit is contained in:
Jiří Klimeš 2015-07-15 14:09:00 +02:00
parent 924117c144
commit 819d3c3db1

View file

@ -76,6 +76,7 @@
#include "nm-connection-provider.h"
#include "nm-config.h"
#include "NetworkManagerUtils.h"
#include "nm-dispatcher.h"
#define LOG(level, ...) \
G_STMT_START { \
@ -2093,6 +2094,7 @@ hostnamed_properties_changed (GDBusProxy *proxy,
g_free (priv->hostname.value);
priv->hostname.value = g_strdup (hostname);
g_object_notify (G_OBJECT (user_data), NM_SETTINGS_HOSTNAME);
nm_dispatcher_call (DISPATCHER_ACTION_HOSTNAME, NULL, NULL, NULL, NULL, NULL);
}
g_variant_unref (v_hostname);