[oe] [PATCH] netbase: change allow-hotplug to auto for usb0 on om-gta01/02 as this seems to not work with busybox ifup/down and handle default route via up/down

mok at mnet-online.de mok at mnet-online.de
Sun Nov 22 21:27:12 UTC 2009


From: Klaus Kurzmann <mok at fluxnetz.de>

Signed-off-by: Klaus Kurzmann <mok at fluxnetz.de>
---
 recipes/netbase/netbase/om-gta01/interfaces |    5 +++--
 recipes/netbase/netbase/om-gta02/interfaces |    7 ++++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/recipes/netbase/netbase/om-gta01/interfaces b/recipes/netbase/netbase/om-gta01/interfaces
index 56c485e..e595239 100644
--- a/recipes/netbase/netbase/om-gta01/interfaces
+++ b/recipes/netbase/netbase/om-gta01/interfaces
@@ -16,14 +16,15 @@ iface eth1 inet dhcp
 
 # Ethernet/RNDIS gadget (g_ether)
 # ... or on host side, usbnet and random hwaddr
-allow-hotplug usb0
+auto usb0
 iface usb0 inet static
 	address 192.168.0.202
 	netmask 255.255.255.0
 	network 192.168.0.0
-	gateway 192.168.0.200
+	up route add default gw 192.168.0.200 metric 8
 	up echo nameserver 208.67.222.222 >> /etc/resolv.conf
 	up echo nameserver 208.67.220.220 >> /etc/resolv.conf
+	down route del default gw 192.168.0.200 metric 8
 
 # Bluetooth networking
 iface bnep0 inet dhcp
diff --git a/recipes/netbase/netbase/om-gta02/interfaces b/recipes/netbase/netbase/om-gta02/interfaces
index ceedfc5..08bd3bb 100644
--- a/recipes/netbase/netbase/om-gta02/interfaces
+++ b/recipes/netbase/netbase/om-gta02/interfaces
@@ -16,14 +16,15 @@ iface eth1 inet dhcp
 
 # Ethernet/RNDIS gadget (g_ether)
 # ... or on host side, usbnet and random hwaddr
-allow-hotplug usb0
+auto usb0
 iface usb0 inet static
 	address 192.168.0.202
 	netmask 255.255.255.0
 	network 192.168.0.0
-	gateway 192.168.0.200
-	up echo nameserver 208.67.222.222 >> /etc/resolv.conf
+	up route add default gw 192.168.0.200 metric 8
+	up echo nameserver 208.67.222.222 > /etc/resolv.conf
 	up echo nameserver 208.67.220.220 >> /etc/resolv.conf
+	down route del default gw 192.168.0.200 metric 8
 
 # Bluetooth networking
 iface bnep0 inet dhcp
-- 
1.6.5.2





More information about the Openembedded-devel mailing list