[Patch] Mark devices disabled on suse



Hey,

Here's a small patch to mark devices disabled when they're disabled in
yast.

Tambet
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/NetworkManager/ChangeLog,v
retrieving revision 1.866.2.140
diff -u -r1.866.2.140 ChangeLog
--- ChangeLog	27 Nov 2006 21:38:07 -0000	1.866.2.140
+++ ChangeLog	30 Nov 2006 09:44:58 -0000
@@ -1,3 +1,8 @@
+2006-11-30  Tambet Ingo  <tambet ximian com>
+
+	* src/backends/NetworkManagerSuSE.c (nm_system_device_get_system_config):
+	Mark device as disabled when the STARTMODE variable is either 'off' or 'manual'.
+
 2006-11-27  Dan Williams  <dcbw redhat com>
 
 	Patch from Christian Persch <chpe gnome org>
Index: src/backends/NetworkManagerSuSE.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/backends/NetworkManagerSuSE.c,v
retrieving revision 1.32.2.25
diff -u -r1.32.2.25 NetworkManagerSuSE.c
--- src/backends/NetworkManagerSuSE.c	8 Nov 2006 09:20:55 -0000	1.32.2.25
+++ src/backends/NetworkManagerSuSE.c	30 Nov 2006 09:44:58 -0000
@@ -518,6 +518,17 @@
 		free (buf);
 	}
 
+	if ((buf = svGetValue (file, "STARTMODE")))
+	{
+		nm_debug ("STARTMODE=%s", buf);
+		if (!strcasecmp (buf, "off") || !strcasecmp (buf, "manual"))
+		{
+			nm_info ("System configuration disables device %s", nm_device_get_iface (dev));
+			sys_data->system_disabled = TRUE;
+		}
+		free (buf);
+	}
+
 	if ((buf = svGetValue (file, "MTU")))
 	{
 		guint32 mtu;


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