settings: load keyfile plugin even if no plugins are given
If no config file was specified, and if no other plugins were given on the command-line, the keyfile plugin would not be loaded. This meant no connections would be read, and no connections could be created either. Always load the keyfile plugin.
This commit is contained in:
@@ -587,7 +587,7 @@ load_plugins (NMSettings *self, const char **plugins, GError **error)
|
|||||||
gboolean keyfile_added = FALSE;
|
gboolean keyfile_added = FALSE;
|
||||||
gboolean success = TRUE;
|
gboolean success = TRUE;
|
||||||
|
|
||||||
for (iter = plugins; *iter; iter++) {
|
for (iter = plugins; iter && *iter; iter++) {
|
||||||
GModule *plugin;
|
GModule *plugin;
|
||||||
char *full_name, *path;
|
char *full_name, *path;
|
||||||
const char *pname = *iter;
|
const char *pname = *iter;
|
||||||
@@ -1768,13 +1768,11 @@ nm_settings_new (const char *config_file,
|
|||||||
priv->dbus_mgr = nm_dbus_manager_get ();
|
priv->dbus_mgr = nm_dbus_manager_get ();
|
||||||
priv->bus = nm_dbus_manager_get_connection (priv->dbus_mgr);
|
priv->bus = nm_dbus_manager_get_connection (priv->dbus_mgr);
|
||||||
|
|
||||||
if (plugins) {
|
|
||||||
/* Load the plugins; fail if a plugin is not found. */
|
/* Load the plugins; fail if a plugin is not found. */
|
||||||
if (!load_plugins (self, plugins, error)) {
|
if (!load_plugins (self, plugins, error)) {
|
||||||
g_object_unref (self);
|
g_object_unref (self);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
unmanaged_specs_changed (NULL, self);
|
unmanaged_specs_changed (NULL, self);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user