NetworkManager r4337 - in trunk: . system-settings/plugins system-settings/plugins/ifcfg-fedora system-settings/plugins/ifcfg-rh system-settings/src
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r4337 - in trunk: . system-settings/plugins system-settings/plugins/ifcfg-fedora system-settings/plugins/ifcfg-rh system-settings/src
- Date: Tue, 25 Nov 2008 22:42:21 +0000 (UTC)
Author: dcbw
Date: Tue Nov 25 22:42:21 2008
New Revision: 4337
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=4337&view=rev
Log:
2008-11-25 Dan Williams <dcbw redhat com>
* system-settings/plugins/ifcfg-rh
- Rename 'ifcfg-fedora' to 'ifcfg-rh'; it's not just used on Fedora
* system-settings/src/main.c
- (load_plugins): transparently handle ifcfg-fedora as ifcfg-rh
Added:
trunk/system-settings/plugins/ifcfg-rh/
- copied from r4333, /trunk/system-settings/plugins/ifcfg-fedora/
Removed:
trunk/system-settings/plugins/ifcfg-fedora/
Modified:
trunk/ChangeLog
trunk/configure.in
trunk/system-settings/plugins/Makefile.am
trunk/system-settings/plugins/ifcfg-rh/Makefile.am
trunk/system-settings/plugins/ifcfg-rh/common.h
trunk/system-settings/src/main.c
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Tue Nov 25 22:42:21 2008
@@ -501,7 +501,7 @@
system-settings/src/Makefile
system-settings/plugins/Makefile
system-settings/plugins/ifupdown/Makefile
-system-settings/plugins/ifcfg-fedora/Makefile
+system-settings/plugins/ifcfg-rh/Makefile
system-settings/plugins/ifcfg-suse/Makefile
system-settings/plugins/keyfile/Makefile
test/Makefile
Modified: trunk/system-settings/plugins/Makefile.am
==============================================================================
--- trunk/system-settings/plugins/Makefile.am (original)
+++ trunk/system-settings/plugins/Makefile.am Tue Nov 25 22:42:21 2008
@@ -1,7 +1,7 @@
SUBDIRS=keyfile
if TARGET_REDHAT
-SUBDIRS+=ifcfg-fedora
+SUBDIRS+=ifcfg-rh
endif
if TARGET_SUSE
@@ -9,7 +9,7 @@
endif
if TARGET_MANDRIVA
-SUBDIRS+=ifcfg-fedora
+SUBDIRS+=ifcfg-rh
endif
if TARGET_DEBIAN
Modified: trunk/system-settings/plugins/ifcfg-rh/Makefile.am
==============================================================================
--- /trunk/system-settings/plugins/ifcfg-fedora/Makefile.am (original)
+++ trunk/system-settings/plugins/ifcfg-rh/Makefile.am Tue Nov 25 22:42:21 2008
@@ -1,7 +1,7 @@
-pkglib_LTLIBRARIES = libnm-settings-plugin-ifcfg-fedora.la
+pkglib_LTLIBRARIES = libnm-settings-plugin-ifcfg-rh.la
-libnm_settings_plugin_ifcfg_fedora_la_SOURCES = \
+libnm_settings_plugin_ifcfg_rh_la_SOURCES = \
shvar.c \
shvar.h \
plugin.c \
@@ -12,7 +12,7 @@
reader.h \
common.h
-libnm_settings_plugin_ifcfg_fedora_la_CPPFLAGS = \
+libnm_settings_plugin_ifcfg_rh_la_CPPFLAGS = \
$(GLIB_CFLAGS) \
$(GMODULE_CFLAGS) \
$(DBUS_CFLAGS) \
@@ -24,8 +24,8 @@
-I$(top_builddir)/marshallers \
-DSYSCONFDIR=\"$(sysconfdir)\"
-libnm_settings_plugin_ifcfg_fedora_la_LDFLAGS = -module -avoid-version
-libnm_settings_plugin_ifcfg_fedora_la_LIBADD = \
+libnm_settings_plugin_ifcfg_rh_la_LDFLAGS = -module -avoid-version
+libnm_settings_plugin_ifcfg_rh_la_LIBADD = \
$(GLIB_LIBS) \
$(GMODULE_LIBS) \
$(top_builddir)/libnm-util/libnm-util.la \
@@ -33,10 +33,10 @@
$(top_builddir)/marshallers/libmarshallers.la
if NO_GIO
-libnm_settings_plugin_ifcfg_fedora_la_LIBADD += \
+libnm_settings_plugin_ifcfg_rh_la_LIBADD += \
$(top_builddir)/gfilemonitor/libgfilemonitor.la
else
-libnm_settings_plugin_ifcfg_fedora_la_LIBADD += \
+libnm_settings_plugin_ifcfg_rh_la_LIBADD += \
$(GIO_LIBS)
endif
Modified: trunk/system-settings/plugins/ifcfg-rh/common.h
==============================================================================
--- /trunk/system-settings/plugins/ifcfg-fedora/common.h (original)
+++ trunk/system-settings/plugins/ifcfg-rh/common.h Tue Nov 25 22:42:21 2008
@@ -28,7 +28,7 @@
#define ORIG_TAG ".orig"
#define REJ_TAG ".rej"
-#define IFCFG_PLUGIN_NAME "ifcfg-fedora"
+#define IFCFG_PLUGIN_NAME "ifcfg-rh"
#define IFCFG_PLUGIN_INFO "(c) 2007 - 2008 Red Hat, Inc. To report bugs please use the NetworkManager mailing list."
#include <glib.h>
Modified: trunk/system-settings/src/main.c
==============================================================================
--- trunk/system-settings/src/main.c (original)
+++ trunk/system-settings/src/main.c Tue Nov 25 22:42:21 2008
@@ -111,31 +111,35 @@
{
GSList *list = NULL;
char **plist;
- char **pname;
+ char **iter;
plist = g_strsplit (plugins, ",", 0);
if (!plist)
return FALSE;
- for (pname = plist; *pname; pname++) {
+ for (iter = plist; *iter; iter++) {
GModule *plugin;
- char *full_name;
- char *path;
+ char *full_name, *path;
+ const char *pname = *iter;
GObject *obj;
GObject * (*factory_func) (void);
- obj = find_plugin (list, *pname);
+ /* ifcfg-fedora was renamed ifcfg-rh; handle old configs here */
+ if (!strcmp (pname, "ifcfg-fedora"))
+ pname = "ifcfg-rh";
+
+ obj = find_plugin (list, pname);
if (obj)
continue;
- full_name = g_strdup_printf ("nm-settings-plugin-%s", *pname);
+ full_name = g_strdup_printf ("nm-settings-plugin-%s", pname);
path = g_module_build_path (PLUGINDIR, full_name);
plugin = g_module_open (path, G_MODULE_BIND_LOCAL);
if (!plugin) {
g_set_error (error, plugins_error_quark (), 0,
"Could not load plugin '%s': %s",
- *pname, g_module_error ());
+ pname, g_module_error ());
g_free (full_name);
g_free (path);
break;
@@ -147,7 +151,7 @@
if (!g_module_symbol (plugin, "nm_system_config_factory", (gpointer) (&factory_func))) {
g_set_error (error, plugins_error_quark (), 0,
"Could not find plugin '%s' factory function.",
- *pname);
+ pname);
break;
}
@@ -155,7 +159,7 @@
if (!obj || !NM_IS_SYSTEM_CONFIG_INTERFACE (obj)) {
g_set_error (error, plugins_error_quark (), 0,
"Plugin '%s' returned invalid system config object.",
- *pname);
+ pname);
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]