summaryrefslogtreecommitdiff
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)
downloadopenembedded-core-33d99387eb822c9133c244d1789122eb4787ccbc.tar.gz
openembedded-core-33d99387eb822c9133c244d1789122eb4787ccbc.tar.bz2
openembedded-core-33d99387eb822c9133c244d1789122eb4787ccbc.zip
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 @@
+Allow interfaces to be ignored by networkmanager by creation of a
+/etc/network/nm-disabled-INTERFACENAME file.
+
+RP - 16/7/2008
+
+Index: trunk/src/backends/NetworkManagerDebian.c
+===================================================================
+--- trunk.orig/src/backends/NetworkManagerDebian.c 2008-07-15 19:23:11.000000000 +0100
++++ trunk/src/backends/NetworkManagerDebian.c 2008-07-15 19:37:05.000000000 +0100
+@@ -29,6 +29,7 @@
+
+ #include <stdio.h>
+ #include <sys/types.h>
++#include <sys/stat.h>
+ #include <signal.h>
+ #include <arpa/inet.h>
+ #include "NetworkManagerGeneric.h"
+@@ -374,12 +375,25 @@
+ /*
+ * nm_system_device_get_disabled
+ *
+- * Return whether the distro-specific system config tells us to use
+- * dhcp for this device.
++ * Return whether the distro-specific system config tells us to interact
++ * with this device.
+ *
+ */
+ gboolean nm_system_device_get_disabled (NMDevice *dev)
+ {
++ struct stat statbuf;
++ gchar *filepath;
++
++ g_return_val_if_fail (dev != NULL, FALSE);
++
++ filepath = g_strdup_printf (SYSCONFDIR"/network/nm-disabled-%s", nm_device_get_iface (dev));
++
++ if (stat(filepath, &statbuf) == 0) {
++ g_free(filepath);
++ return TRUE;
++ }
++
++ g_free(filepath);
+ return FALSE;
+ }
+
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"
RDEPENDS = "hal wpa-supplicant iproute2 dhcp-client"
PV = "0.7+svnr${SRCREV}"
-PR = "r6"
+PR = "r7"
SRC_URI="svn://svn.gnome.org/svn/NetworkManager/;module=trunk;proto=http \
file://no-restarts.diff;patch=1;pnum=0 \
file://makefile-fix.patch;patch=1 \
+ file://allow-disabling.patch;patch=1 \
file://NetworkManager \
file://99_networkmanager"