summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-07-16 08:35:51 +0000
committerRichard Purdie <richard@openedhand.com>2008-07-16 08:35:51 +0000
commit33d99387eb822c9133c244d1789122eb4787ccbc (patch)
tree74c7ef7c670499eac1f1c23f45d27d228781972b
parenta3d88b472b58128d667cd1b8ff2a5b5a955110c8 (diff)
downloadpoky-33d99387eb822c9133c244d1789122eb4787ccbc.tar.gz
networkmanager: Add a method to stop network manager controlling selected network interfaces
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4843 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--meta/packages/networkmanager/files/allow-disabling.patch45
-rw-r--r--meta/packages/networkmanager/networkmanager_svn.bb3
2 files changed, 47 insertions, 1 deletions
diff --git a/meta/packages/networkmanager/files/allow-disabling.patch b/meta/packages/networkmanager/files/allow-disabling.patch
new file mode 100644
index 0000000000..10730e9fe5
--- /dev/null
+++ b/meta/packages/networkmanager/files/allow-disabling.patch
@@ -0,0 +1,45 @@
1Allow interfaces to be ignored by networkmanager by creation of a
2/etc/network/nm-disabled-INTERFACENAME file.
3
4RP - 16/7/2008
5
6Index: trunk/src/backends/NetworkManagerDebian.c
7===================================================================
8--- trunk.orig/src/backends/NetworkManagerDebian.c 2008-07-15 19:23:11.000000000 +0100
9+++ trunk/src/backends/NetworkManagerDebian.c 2008-07-15 19:37:05.000000000 +0100
10@@ -29,6 +29,7 @@
11
12 #include <stdio.h>
13 #include <sys/types.h>
14+#include <sys/stat.h>
15 #include <signal.h>
16 #include <arpa/inet.h>
17 #include "NetworkManagerGeneric.h"
18@@ -374,12 +375,25 @@
19 /*
20 * nm_system_device_get_disabled
21 *
22- * Return whether the distro-specific system config tells us to use
23- * dhcp for this device.
24+ * Return whether the distro-specific system config tells us to interact
25+ * with this device.
26 *
27 */
28 gboolean nm_system_device_get_disabled (NMDevice *dev)
29 {
30+ struct stat statbuf;
31+ gchar *filepath;
32+
33+ g_return_val_if_fail (dev != NULL, FALSE);
34+
35+ filepath = g_strdup_printf (SYSCONFDIR"/network/nm-disabled-%s", nm_device_get_iface (dev));
36+
37+ if (stat(filepath, &statbuf) == 0) {
38+ g_free(filepath);
39+ return TRUE;
40+ }
41+
42+ g_free(filepath);
43 return FALSE;
44 }
45
diff --git a/meta/packages/networkmanager/networkmanager_svn.bb b/meta/packages/networkmanager/networkmanager_svn.bb
index 58a15aaa24..0061bb28e9 100644
--- a/meta/packages/networkmanager/networkmanager_svn.bb
+++ b/meta/packages/networkmanager/networkmanager_svn.bb
@@ -7,11 +7,12 @@ DEPENDS = "libnl dbus dbus-glib hal gconf-dbus wireless-tools ppp gnome-common"
7RDEPENDS = "hal wpa-supplicant iproute2 dhcp-client" 7RDEPENDS = "hal wpa-supplicant iproute2 dhcp-client"
8 8
9PV = "0.7+svnr${SRCREV}" 9PV = "0.7+svnr${SRCREV}"
10PR = "r6" 10PR = "r7"
11 11
12SRC_URI="svn://svn.gnome.org/svn/NetworkManager/;module=trunk;proto=http \ 12SRC_URI="svn://svn.gnome.org/svn/NetworkManager/;module=trunk;proto=http \
13 file://no-restarts.diff;patch=1;pnum=0 \ 13 file://no-restarts.diff;patch=1;pnum=0 \
14 file://makefile-fix.patch;patch=1 \ 14 file://makefile-fix.patch;patch=1 \
15 file://allow-disabling.patch;patch=1 \
15 file://NetworkManager \ 16 file://NetworkManager \
16 file://99_networkmanager" 17 file://99_networkmanager"
17 18