dispatcher: don't warn about invalid connection for 'hostname' action (rh #627649)

This commit is contained in:
Jiří Klimeš 2010-11-01 16:02:32 +01:00
parent bc76e40dec
commit 4501e33b85

View file

@ -489,6 +489,10 @@ nm_dispatcher_action (Handler *h,
if (!d->persist)
d->quit_timeout = g_timeout_add_seconds (10, quit_timeout_cb, NULL);
/* Hostname changes don't require a device nor contain a connection */
if (!strcmp (action, "hostname"))
goto dispatch;
connection = nm_connection_new_from_hash (connection_hash, error);
if (connection) {
NMSettingConnection *s_con;
@ -506,10 +510,6 @@ nm_dispatcher_action (Handler *h,
*error = NULL;
}
/* Hostname changes don't require a device */
if (!strcmp (action, "hostname"))
goto dispatch;
/* interface name */
value = g_hash_table_lookup (device_props, NMD_DEVICE_PROPS_INTERFACE);
if (!value || !G_VALUE_HOLDS_STRING (value)) {