mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 09:40:17 +01:00
settings: remove ifcfg-suse plugin
After the hostname functionality has been moved from plugins to core, the ifcfg-suse plugin contains only boilerplate code with no actual functionality. Remove the plugin, mark it as deprecated in manual page and print a warning when it is selected in configuration file.
This commit is contained in:
parent
6dc35e66d4
commit
4739ff6e7c
8 changed files with 9 additions and 210 deletions
|
|
@ -40,7 +40,6 @@ DISTCHECK_CONFIGURE_FLAGS = \
|
|||
--with-udev-dir=$$dc_install_base/lib/udev \
|
||||
--with-wext=no \
|
||||
--enable-ifcfg-rh \
|
||||
--enable-ifcfg-suse \
|
||||
--enable-ifupdown \
|
||||
--enable-ifnet
|
||||
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ AC_SUBST(nmrundir, "$runstatedir/$PACKAGE", [NetworkManager runtime state direct
|
|||
# Alternative configuration plugins
|
||||
AC_ARG_ENABLE(config-plugin-ibft, AS_HELP_STRING([--enable-config-plugin-ibft], [enable ibft configuration plugin]))
|
||||
AC_ARG_ENABLE(ifcfg-rh, AS_HELP_STRING([--enable-ifcfg-rh], [enable ifcfg-rh configuration plugin (Fedora/RHEL)]))
|
||||
AC_ARG_ENABLE(ifcfg-suse, AS_HELP_STRING([--enable-ifcfg-suse], [enable ifcfg-suse configuration plugin (SUSE)]))
|
||||
AC_ARG_ENABLE(ifcfg-suse, AS_HELP_STRING([--enable-ifcfg-suse], [enable ifcfg-suse configuration plugin (SUSE) (deprecated)]))
|
||||
AC_ARG_ENABLE(ifupdown, AS_HELP_STRING([--enable-ifupdown], [enable ifupdown configuration plugin (Debian/Ubuntu)]))
|
||||
AC_ARG_ENABLE(ifnet, AS_HELP_STRING([--enable-ifnet], [enable ifnet configuration plugin (Gentoo)]))
|
||||
# Default alternative plugins by distribution
|
||||
|
|
@ -105,7 +105,6 @@ AS_IF([test -z "$enable_config_plugin_ibft"], enable_config_plugin_ibft="yes")
|
|||
# Create automake conditionals
|
||||
AM_CONDITIONAL(CONFIG_PLUGIN_IBFT, test "$enable_config_plugin_ibft" = "yes")
|
||||
AM_CONDITIONAL(CONFIG_PLUGIN_IFCFG_RH, test "$enable_ifcfg_rh" = "yes")
|
||||
AM_CONDITIONAL(CONFIG_PLUGIN_IFCFG_SUSE, test "$enable_ifcfg_suse" = "yes")
|
||||
AM_CONDITIONAL(CONFIG_PLUGIN_IFUPDOWN, test "$enable_ifupdown" = "yes")
|
||||
AM_CONDITIONAL(CONFIG_PLUGIN_IFNET, test "$enable_ifnet" = "yes")
|
||||
|
||||
|
|
@ -113,7 +112,6 @@ AC_ARG_WITH(config-plugins-default, AS_HELP_STRING([--with-config-plugins-defaul
|
|||
if test -z "$config_plugins_default" -o "$config_plugins_default" = no; then
|
||||
config_plugins_default=''
|
||||
test "$enable_ifcfg_rh" = "yes" && config_plugins_default="$config_plugins_default,ifcfg-rh"
|
||||
test "$enable_ifcfg_suse" = "yes" && config_plugins_default="$config_plugins_default,ifcfg-suse"
|
||||
test "$enable_ifupdown" = "yes" && config_plugins_default="$config_plugins_default,ifupdown"
|
||||
test "$enable_ifnet" = "yes" && config_plugins_default="$config_plugins_default,ifnet"
|
||||
test "$enable_config_plugin_ibft" = "yes" && config_plugins_default="$config_plugins_default,ibft"
|
||||
|
|
@ -979,7 +977,6 @@ src/settings/plugins/ifcfg-rh/tests/Makefile
|
|||
src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile
|
||||
src/settings/plugins/ibft/Makefile
|
||||
src/settings/plugins/ibft/tests/Makefile
|
||||
src/settings/plugins/ifcfg-suse/Makefile
|
||||
src/settings/plugins/keyfile/Makefile
|
||||
src/settings/plugins/keyfile/tests/Makefile
|
||||
src/settings/plugins/keyfile/tests/keyfiles/Makefile
|
||||
|
|
@ -1104,7 +1101,6 @@ echo
|
|||
echo "Configuration plugins (main.plugins=${config_plugins_default})"
|
||||
echo " ibft: ${enable_config_plugin_ibft}"
|
||||
echo " ifcfg-rh: ${enable_ifcfg_rh}"
|
||||
echo " ifcfg-suse: ${enable_ifcfg_suse}"
|
||||
echo " ifupdown: ${enable_ifupdown}"
|
||||
echo " ifnet: ${enable_ifnet}"
|
||||
echo
|
||||
|
|
|
|||
|
|
@ -622,12 +622,9 @@ ipv6.ip6-privacy=1
|
|||
<term><varname>ifcfg-suse</varname></term>
|
||||
<listitem>
|
||||
<para>
|
||||
This plugin is only provided for simple backward
|
||||
compatibility with SUSE and OpenSUSE configuration. Most
|
||||
setups should be using the <literal>keyfile</literal>
|
||||
plugin instead. The <literal>ifcfg-suse</literal> plugin
|
||||
supports reading Ethernet and Wi-Fi connections, but does
|
||||
not support saving any connection types.
|
||||
This plugin is deprecated and its selection has no effect.
|
||||
The <literal>keyfile</literal> plugin should be used
|
||||
instead.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
|
|
|||
|
|
@ -780,6 +780,11 @@ load_plugins (NMSettings *self, const char **plugins, GError **error)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!strcmp (pname, "ifcfg-suse")) {
|
||||
LOG (LOGL_WARN, "skipping deprecated plugin ifcfg-suse");
|
||||
continue;
|
||||
}
|
||||
|
||||
obj = find_plugin (list, pname);
|
||||
if (obj)
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -10,10 +10,6 @@ if CONFIG_PLUGIN_IFCFG_RH
|
|||
SUBDIRS+=ifcfg-rh
|
||||
endif
|
||||
|
||||
if CONFIG_PLUGIN_IFCFG_SUSE
|
||||
SUBDIRS+=ifcfg-suse
|
||||
endif
|
||||
|
||||
if CONFIG_PLUGIN_IFUPDOWN
|
||||
SUBDIRS+=ifupdown
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
AM_CPPFLAGS = \
|
||||
$(GLIB_CFLAGS) \
|
||||
-I${top_srcdir}/src \
|
||||
-I${top_srcdir}/src/settings \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/libnm-core \
|
||||
-I$(top_builddir)/libnm-core \
|
||||
-DG_LOG_DOMAIN=\""NetworkManager-ifcfg-suse"\" \
|
||||
-DNETWORKMANAGER_COMPILATION \
|
||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||
-DSYSCONFDIR=\"$(sysconfdir)\"
|
||||
|
||||
pkglib_LTLIBRARIES = libnm-settings-plugin-ifcfg-suse.la
|
||||
|
||||
libnm_settings_plugin_ifcfg_suse_la_SOURCES = \
|
||||
plugin.c \
|
||||
plugin.h
|
||||
|
||||
libnm_settings_plugin_ifcfg_suse_la_LDFLAGS = -module -avoid-version
|
||||
|
|
@ -1,125 +0,0 @@
|
|||
/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
|
||||
|
||||
/* NetworkManager system settings service
|
||||
*
|
||||
* Søren Sandmann <sandmann@daimi.au.dk>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* (C) Copyright 2007 - 2011 Red Hat, Inc.
|
||||
* (C) Copyright 2007 - 2008 Novell, Inc.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <gmodule.h>
|
||||
#include <glib-object.h>
|
||||
#include <gio/gio.h>
|
||||
|
||||
#include "plugin.h"
|
||||
#include "nm-system-config-interface.h"
|
||||
|
||||
#define IFCFG_PLUGIN_NAME "ifcfg-suse"
|
||||
#define IFCFG_PLUGIN_INFO "(C) 2008 Novell, Inc. To report bugs please use the NetworkManager mailing list."
|
||||
|
||||
static void system_config_interface_init (NMSystemConfigInterface *system_config_interface_class);
|
||||
|
||||
G_DEFINE_TYPE_EXTENDED (SCPluginIfcfg, sc_plugin_ifcfg, G_TYPE_OBJECT, 0,
|
||||
G_IMPLEMENT_INTERFACE (NM_TYPE_SYSTEM_CONFIG_INTERFACE,
|
||||
system_config_interface_init))
|
||||
|
||||
static void
|
||||
init (NMSystemConfigInterface *config)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
sc_plugin_ifcfg_init (SCPluginIfcfg *self)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
get_property (GObject *object, guint prop_id,
|
||||
GValue *value, GParamSpec *pspec)
|
||||
{
|
||||
switch (prop_id) {
|
||||
case NM_SYSTEM_CONFIG_INTERFACE_PROP_NAME:
|
||||
g_value_set_string (value, IFCFG_PLUGIN_NAME);
|
||||
break;
|
||||
case NM_SYSTEM_CONFIG_INTERFACE_PROP_INFO:
|
||||
g_value_set_string (value, IFCFG_PLUGIN_INFO);
|
||||
break;
|
||||
case NM_SYSTEM_CONFIG_INTERFACE_PROP_CAPABILITIES:
|
||||
g_value_set_uint (value, NM_SYSTEM_CONFIG_INTERFACE_CAP_NONE);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
set_property (GObject *object, guint prop_id,
|
||||
const GValue *value, GParamSpec *pspec)
|
||||
{
|
||||
switch (prop_id) {
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
sc_plugin_ifcfg_class_init (SCPluginIfcfgClass *req_class)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (req_class);
|
||||
|
||||
object_class->get_property = get_property;
|
||||
object_class->set_property = set_property;
|
||||
|
||||
g_object_class_override_property (object_class,
|
||||
NM_SYSTEM_CONFIG_INTERFACE_PROP_NAME,
|
||||
NM_SYSTEM_CONFIG_INTERFACE_NAME);
|
||||
|
||||
g_object_class_override_property (object_class,
|
||||
NM_SYSTEM_CONFIG_INTERFACE_PROP_INFO,
|
||||
NM_SYSTEM_CONFIG_INTERFACE_INFO);
|
||||
|
||||
g_object_class_override_property (object_class,
|
||||
NM_SYSTEM_CONFIG_INTERFACE_PROP_CAPABILITIES,
|
||||
NM_SYSTEM_CONFIG_INTERFACE_CAPABILITIES);
|
||||
}
|
||||
|
||||
static void
|
||||
system_config_interface_init (NMSystemConfigInterface *system_config_interface_class)
|
||||
{
|
||||
/* interface implementation */
|
||||
system_config_interface_class->init = init;
|
||||
}
|
||||
|
||||
G_MODULE_EXPORT GObject *
|
||||
nm_system_config_factory (void)
|
||||
{
|
||||
static SCPluginIfcfg *singleton = NULL;
|
||||
|
||||
if (!singleton)
|
||||
singleton = SC_PLUGIN_IFCFG (g_object_new (SC_TYPE_PLUGIN_IFCFG, NULL));
|
||||
else
|
||||
g_object_ref (singleton);
|
||||
|
||||
return G_OBJECT (singleton);
|
||||
}
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
/* NetworkManager system settings service
|
||||
*
|
||||
* Søren Sandmann <sandmann@daimi.au.dk>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* (C) Copyright 2007 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#ifndef _PLUGIN_H_
|
||||
#define _PLUGIN_H_
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#define PLUGIN_NAME "ifcfg-suse"
|
||||
|
||||
#define SC_TYPE_PLUGIN_IFCFG (sc_plugin_ifcfg_get_type ())
|
||||
#define SC_PLUGIN_IFCFG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SC_TYPE_PLUGIN_IFCFG, SCPluginIfcfg))
|
||||
#define SC_PLUGIN_IFCFG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SC_TYPE_PLUGIN_IFCFG, SCPluginIfcfgClass))
|
||||
#define SC_IS_PLUGIN_IFCFG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SC_TYPE_PLUGIN_IFCFG))
|
||||
#define SC_IS_PLUGIN_IFCFG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SC_TYPE_PLUGIN_IFCFG))
|
||||
#define SC_PLUGIN_IFCFG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SC_TYPE_PLUGIN_IFCFG, SCPluginIfcfgClass))
|
||||
|
||||
typedef struct _SCPluginIfcfg SCPluginIfcfg;
|
||||
typedef struct _SCPluginIfcfgClass SCPluginIfcfgClass;
|
||||
|
||||
struct _SCPluginIfcfg {
|
||||
GObject parent;
|
||||
};
|
||||
|
||||
struct _SCPluginIfcfgClass {
|
||||
GObjectClass parent;
|
||||
};
|
||||
|
||||
GType sc_plugin_ifcfg_get_type (void);
|
||||
|
||||
#endif /* _PLUGIN_H_ */
|
||||
|
||||
Loading…
Add table
Reference in a new issue