system-settings: fix loading connection by plugins
The error case was as follows. When using 'ifupdown,keyfile' plugins and 'eth0' present in /etc/network/interfaces on a Debian-based system, 'ifupdown' plugin, in unmanaged mode, load_connections() prematurely and thus effectively blocked reading connections from 'keyfile' plugin. Patch by Dan and tested by me.
This commit is contained in:
@@ -357,8 +357,6 @@ add_plugin (NMSysconfigSettings *self, NMSystemConfigInterface *plugin)
|
|||||||
|
|
||||||
g_signal_connect (plugin, NM_SYSTEM_CONFIG_INTERFACE_CONNECTION_ADDED,
|
g_signal_connect (plugin, NM_SYSTEM_CONFIG_INTERFACE_CONNECTION_ADDED,
|
||||||
G_CALLBACK (plugin_connection_added), self);
|
G_CALLBACK (plugin_connection_added), self);
|
||||||
g_signal_connect (plugin, NM_SYSTEM_CONFIG_INTERFACE_UNMANAGED_SPECS_CHANGED,
|
|
||||||
G_CALLBACK (unmanaged_specs_changed), self);
|
|
||||||
g_signal_connect (plugin, "notify::hostname", G_CALLBACK (hostname_changed), self);
|
g_signal_connect (plugin, "notify::hostname", G_CALLBACK (hostname_changed), self);
|
||||||
|
|
||||||
nm_system_config_interface_init (plugin, NULL);
|
nm_system_config_interface_init (plugin, NULL);
|
||||||
@@ -368,6 +366,9 @@ add_plugin (NMSysconfigSettings *self, NMSystemConfigInterface *plugin)
|
|||||||
NM_SYSTEM_CONFIG_INTERFACE_INFO, &pinfo,
|
NM_SYSTEM_CONFIG_INTERFACE_INFO, &pinfo,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
g_signal_connect (plugin, NM_SYSTEM_CONFIG_INTERFACE_UNMANAGED_SPECS_CHANGED,
|
||||||
|
G_CALLBACK (unmanaged_specs_changed), self);
|
||||||
|
|
||||||
nm_log_info (LOGD_SYS_SET, "Loaded plugin %s: %s", pname, pinfo);
|
nm_log_info (LOGD_SYS_SET, "Loaded plugin %s: %s", pname, pinfo);
|
||||||
g_free (pname);
|
g_free (pname);
|
||||||
g_free (pinfo);
|
g_free (pinfo);
|
||||||
@@ -1328,6 +1329,7 @@ nm_sysconfig_settings_new (const char *config_file,
|
|||||||
g_object_unref (self);
|
g_object_unref (self);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
unmanaged_specs_changed (NULL, self);
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
|
Reference in New Issue
Block a user