* Please review, update, cleanup before pushing to oe.dev!
---
recipes/netbase/netbase/om-gta01/interfaces | 5 ++-
recipes/netbase/netbase/om-gta02/interfaces | 7 ++--
recipes/netbase/netbase/shr/init | 46 +++++++++++++++++++++++++++
recipes/netbase/netbase/shr/options | 1 +
4 files changed, 54 insertions(+), 5 deletions(-)
create mode 100644 recipes/netbase/netbase/shr/init
create mode 100644 recipes/netbase/netbase/shr/options
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
diff --git a/recipes/netbase/netbase/shr/init b/recipes/netbase/netbase/shr/init
new file mode 100644
index 0000000..32810dc
--- /dev/null
+++ b/recipes/netbase/netbase/shr/init
@@ -0,0 +1,46 @@
+#!/bin/sh
+#
+# manage network interfaces and configure some networking options
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+if ! [ -x /sbin/ifup ]; then
+ exit 0
+fi
+
+case "$1" in
+ start)
+ echo -n "Configuring network interfaces... "
+ ifup -a
+ echo "done."
+ ;;
+ stop)
+ if sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |
+ grep -q "^/ nfs$"; then
+ echo "NOT deconfiguring network interfaces: / is an NFS mount"
+ elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |
+ grep -q "^/ smbfs$"; then
+ echo "NOT deconfiguring network interfaces: / is an SMB mount"
+ elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts |
+ grep -qE '^(nfs|smbfs|ncp|coda)$'; then
+ echo "NOT deconfiguring network interfaces: network shares still
mounted."
+ else
+ echo -n "Deconfiguring network interfaces... "
+ ifdown -a
+ echo "done."
+ fi
+ ;;
+ force-reload|restart)
+ echo -n "Reconfiguring network interfaces... "
+ ifdown -a
+ ifup -a
+ echo "done."
+ ;;
+ *)
+ echo "Usage: /etc/init.d/networking {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
+
diff --git a/recipes/netbase/netbase/shr/options
b/recipes/netbase/netbase/shr/options
new file mode 100644
index 0000000..1cbffcb
--- /dev/null
+++ b/recipes/netbase/netbase/shr/options
@@ -0,0 +1 @@
+# DEPRECATED by /etc/sysctl.conf
--
1.6.5.3
_______________________________________________
Shr-devel mailing list
[email protected]
http://lists.shr-project.org/mailman/listinfo/shr-devel