[PATCH 1/2] ifupdown: Correctly mark unmanaged devices

See attached patch for details.

Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
From fc86ba3b0c7d403defb3014ed5f1e1f745e4c8fc Mon Sep 17 00:00:00 2001
From: Michael Biebl <biebl debian org>
Date: Mon, 6 Dec 2010 18:57:50 +0100
Subject: [PATCH 1/2] ifupdown: Correctly mark unmanaged devices

If we find a "iface ..." line, add the interface to
well_known_interfaces no matter if there is a connection for it or not.

Otherwise we fail to mark devices as unmageded in cases like

iface wlan0 inet manual
	wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

as NM does not know how to parse such a interface configuration.

Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=569215
 system-settings/plugins/ifupdown/plugin.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/system-settings/plugins/ifupdown/plugin.c b/system-settings/plugins/ifupdown/plugin.c
index 33c058e..7daa06a 100644
--- a/system-settings/plugins/ifupdown/plugin.c
+++ b/system-settings/plugins/ifupdown/plugin.c
@@ -368,6 +368,7 @@ SCPluginIfupdown_init (NMSystemConfigInterface *config)
 			/* Remove any connection for this block that was previously found */
 			exported = g_hash_table_lookup (priv->iface_connections, block->name);
 			if (exported) {
+				PLUGIN_PRINT("SCPlugin-Ifupdown", "deleting %s from iface_connections", block->name);
 				nm_settings_connection_interface_delete (NM_SETTINGS_CONNECTION_INTERFACE (exported),
@@ -377,11 +378,14 @@ SCPluginIfupdown_init (NMSystemConfigInterface *config)
 			/* add the new connection */
 			exported = nm_ifupdown_connection_new (block);
 			if (exported) {
+				PLUGIN_PRINT("SCPlugin-Ifupdown", "adding %s to iface_connections", block->name);
 				g_hash_table_insert (priv->iface_connections, block->name, exported);
-				g_hash_table_insert (priv->well_known_interfaces, block->name, "known");
+			PLUGIN_PRINT("SCPlugin-Ifupdown", "adding iface %s to well_known_interfaces", block->name);
+			g_hash_table_insert (priv->well_known_interfaces, block->name, "known");
 		} else if (!strcmp ("mapping", block->type)) {
 			g_hash_table_insert (priv->well_known_interfaces, block->name, "known");
+			PLUGIN_PRINT("SCPlugin-Ifupdown", "adding mapping %s to well_known_interfaces", block->name);
 		block = block->next;

Attachment: signature.asc
Description: OpenPGP digital signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]