core: build keyfile plugin into NetworkManager
Since settings storage is now handled by NetworkManager, we must have the ability to read/write all connection types at all times. Since the 'keyfile' plugin is the only plugin that can handle all connection types, build it into NetworkManager.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
INCLUDES = -I${top_srcdir} \
|
||||
-I${top_srcdir}/include \
|
||||
-I${top_srcdir}/libnm-util \
|
||||
-I${top_srcdir}/libnm-glib \
|
||||
-I${top_srcdir}/src/logging \
|
||||
-I${top_srcdir}/src \
|
||||
-I${top_builddir}/marshallers
|
||||
@@ -44,9 +43,9 @@ libsettings_la_CPPFLAGS = \
|
||||
|
||||
libsettings_la_LIBADD = \
|
||||
$(top_builddir)/libnm-util/libnm-util.la \
|
||||
$(top_builddir)/libnm-glib/libnm-glib.la \
|
||||
$(top_builddir)/marshallers/libmarshallers.la \
|
||||
$(top_builddir)/src/logging/libnm-logging.la \
|
||||
$(top_builddir)/system-settings/plugins/keyfile/libnm-settings-plugin-keyfile.la \
|
||||
$(DBUS_LIBS) \
|
||||
$(GLIB_LIBS) \
|
||||
$(GMODULE_LIBS) \
|
||||
@@ -54,7 +53,6 @@ libsettings_la_LIBADD = \
|
||||
|
||||
libsettings_la_LDFLAGS = -rdynamic
|
||||
|
||||
|
||||
nm-settings-glue.h: $(top_srcdir)/introspection/nm-settings.xml
|
||||
$(AM_V_GEN) dbus-binding-tool --prefix=nm_settings --mode=glib-server --output=$@ $<
|
||||
|
||||
|
@@ -62,6 +62,7 @@
|
||||
#include "nm-dbus-manager.h"
|
||||
#include "nm-manager-auth.h"
|
||||
#include "nm-session-monitor.h"
|
||||
#include "system-settings/plugins/keyfile/plugin.h"
|
||||
|
||||
#define CONFIG_KEY_NO_AUTO_DEFAULT "no-auto-default"
|
||||
|
||||
@@ -520,6 +521,10 @@ load_plugins (NMSettings *self, const char *plugins, GError **error)
|
||||
GObject *obj;
|
||||
GObject * (*factory_func) (void);
|
||||
|
||||
/* keyfile plugin built in now */
|
||||
if (!strcmp (pname, "keyfile"))
|
||||
continue;
|
||||
|
||||
/* ifcfg-fedora was renamed ifcfg-rh; handle old configs here */
|
||||
if (!strcmp (pname, "ifcfg-fedora"))
|
||||
pname = "ifcfg-rh";
|
||||
@@ -1328,11 +1333,12 @@ nm_settings_device_removed (NMSettings *self, NMDevice *device)
|
||||
|
||||
NMSettings *
|
||||
nm_settings_new (const char *config_file,
|
||||
const char *plugins,
|
||||
GError **error)
|
||||
const char *plugins,
|
||||
GError **error)
|
||||
{
|
||||
NMSettings *self;
|
||||
NMSettingsPrivate *priv;
|
||||
GObject *keyfile_plugin;
|
||||
|
||||
self = g_object_new (NM_TYPE_SETTINGS, NULL);
|
||||
if (!self)
|
||||
@@ -1353,6 +1359,11 @@ nm_settings_new (const char *config_file,
|
||||
unmanaged_specs_changed (NULL, self);
|
||||
}
|
||||
|
||||
/* Add the keyfile plugin last */
|
||||
keyfile_plugin = nm_settings_keyfile_plugin_new ();
|
||||
g_assert (keyfile_plugin);
|
||||
add_plugin (self, NM_SYSTEM_CONFIG_INTERFACE (keyfile_plugin));
|
||||
|
||||
dbus_g_connection_register_g_object (priv->bus, NM_DBUS_PATH_SETTINGS, G_OBJECT (self));
|
||||
return self;
|
||||
}
|
||||
|
Reference in New Issue
Block a user