aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/netbase/netbase-5.0
diff options
context:
space:
mode:
authorCristian Iorga <cristian.iorga@intel.com>2012-07-04 14:34:01 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-05 14:18:19 +0100
commit5beb7176d361d4bfa279bbfab5a17b8fe4fa3b73 (patch)
tree02c819692b5374f82192921dfcd7aa7b9a0a1d27 /meta/recipes-core/netbase/netbase-5.0
parent1b2f6a21dde6045c4604ca5463e6c4db3499ee06 (diff)
downloadopenembedded-core-contrib-5beb7176d361d4bfa279bbfab5a17b8fe4fa3b73.tar.gz
openembedded-core-contrib-5beb7176d361d4bfa279bbfab5a17b8fe4fa3b73.tar.bz2
openembedded-core-contrib-5beb7176d361d4bfa279bbfab5a17b8fe4fa3b73.zip
netbase: update to ver. 5.0
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/netbase/netbase-5.0')
-rw-r--r--meta/recipes-core/netbase/netbase-5.0/hosts2
-rw-r--r--meta/recipes-core/netbase/netbase-5.0/init89
-rw-r--r--meta/recipes-core/netbase/netbase-5.0/interfaces31
-rw-r--r--meta/recipes-core/netbase/netbase-5.0/nfsroot39
-rw-r--r--meta/recipes-core/netbase/netbase-5.0/qemuarm/interfaces5
-rw-r--r--meta/recipes-core/netbase/netbase-5.0/qemuarmv6/interfaces5
-rw-r--r--meta/recipes-core/netbase/netbase-5.0/qemuarmv7/interfaces5
-rw-r--r--meta/recipes-core/netbase/netbase-5.0/qemumips/interfaces8
-rw-r--r--meta/recipes-core/netbase/netbase-5.0/qemumips64/interfaces8
-rw-r--r--meta/recipes-core/netbase/netbase-5.0/qemuppc/interfaces8
-rw-r--r--meta/recipes-core/netbase/netbase-5.0/qemush4/interfaces8
-rw-r--r--meta/recipes-core/netbase/netbase-5.0/qemux86-64/interfaces8
-rw-r--r--meta/recipes-core/netbase/netbase-5.0/qemux86/interfaces8
13 files changed, 224 insertions, 0 deletions
diff --git a/meta/recipes-core/netbase/netbase-5.0/hosts b/meta/recipes-core/netbase/netbase-5.0/hosts
new file mode 100644
index 0000000000..2f332451b5
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase-5.0/hosts
@@ -0,0 +1,2 @@
+127.0.0.1 localhost.localdomain localhost
+
diff --git a/meta/recipes-core/netbase/netbase-5.0/init b/meta/recipes-core/netbase/netbase-5.0/init
new file mode 100644
index 0000000000..bace9df991
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase-5.0/init
@@ -0,0 +1,89 @@
+#!/bin/sh -e
+### BEGIN INIT INFO
+# Provides: networking
+# Required-Start: mountvirtfs $local_fs
+# Required-Stop: $local_fs
+# Should-Start: ifupdown
+# Should-Stop: ifupdown
+# Default-Start: S
+# Default-Stop: 0 6
+# Short-Description: Raise network interfaces.
+### END INIT INFO
+
+PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
+
+[ -x /sbin/ifup ] || exit 0
+
+check_network_file_systems() {
+ [ -e /proc/mounts ] || return 0
+
+ if [ -e /etc/iscsi/iscsi.initramfs ]; then
+ echo "not deconfiguring network interfaces: iSCSI root is mounted."
+ exit 0
+ fi
+
+ exec 9<&0 < /proc/mounts
+ while read DEV MTPT FSTYPE REST; do
+ case $DEV in
+ /dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)
+ echo "not deconfiguring network interfaces: network devices still mounted."
+ exit 0
+ ;;
+ esac
+ case $FSTYPE in
+ nfs|nfs4|smbfs|ncp|ncpfs|cifs|coda|ocfs2|gfs|pvfs|pvfs2|fuse.httpfs|fuse.curlftpfs)
+ echo "not deconfiguring network interfaces: network file systems still mounted."
+ exit 0
+ ;;
+ esac
+ done
+ exec 0<&9 9<&-
+}
+
+check_network_swap() {
+ [ -e /proc/swaps ] || return 0
+
+ exec 9<&0 < /proc/swaps
+ while read DEV MTPT FSTYPE REST; do
+ case $DEV in
+ /dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)
+ echo "not deconfiguring network interfaces: network swap still mounted."
+ exit 0
+ ;;
+ esac
+ done
+ exec 0<&9 9<&-
+}
+
+case "$1" in
+start)
+ echo -n "Configuring network interfaces... "
+ ifup -a
+ echo "done."
+ ;;
+
+stop)
+ check_network_file_systems
+ check_network_swap
+
+ echo -n "Deconfiguring network interfaces... "
+ ifdown -a
+ echo "done."
+ ;;
+
+force-reload|restart)
+ echo "Running $0 $1 is deprecated because it may not enable again some interfaces"
+ echo "Reconfiguring network interfaces... "
+ ifdown -a || true
+ ifup -a
+ echo "done."
+ ;;
+
+*)
+ echo "Usage: /etc/init.d/networking {start|stop}"
+ exit 1
+ ;;
+esac
+
+exit 0
+
diff --git a/meta/recipes-core/netbase/netbase-5.0/interfaces b/meta/recipes-core/netbase/netbase-5.0/interfaces
new file mode 100644
index 0000000000..0acf4cf441
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase-5.0/interfaces
@@ -0,0 +1,31 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+# Wireless interfaces
+iface wlan0 inet dhcp
+ wireless_mode managed
+ wireless_essid any
+ wpa-driver wext
+ wpa-conf /etc/wpa_supplicant.conf
+
+iface atml0 inet dhcp
+
+# Wired or wireless interfaces
+auto eth0
+iface eth0 inet dhcp
+iface eth1 inet dhcp
+
+# Ethernet/RNDIS gadget (g_ether)
+# ... or on host side, usbnet and random hwaddr
+iface usb0 inet static
+ address 192.168.7.2
+ netmask 255.255.255.0
+ network 192.168.7.0
+ gateway 192.168.7.1
+
+# Bluetooth networking
+iface bnep0 inet dhcp
+
diff --git a/meta/recipes-core/netbase/netbase-5.0/nfsroot b/meta/recipes-core/netbase/netbase-5.0/nfsroot
new file mode 100644
index 0000000000..750c0a98f9
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase-5.0/nfsroot
@@ -0,0 +1,39 @@
+#! /bin/sh
+
+# In case the interface is used as nfsroot, avoid ifup, otherwise
+# nfsroot may lose response
+
+nfsroot=0
+
+if test "x$IFACE" = xlo ; then
+ exit 0
+fi
+
+exec 9<&0 < /proc/mounts
+while read dev mtpt fstype rest; do
+ if test $mtpt = "/" ; then
+ case $fstype in
+ nfs | nfs4)
+ nfsroot=1
+ nfs_addr=`echo $rest | sed -e 's/^.*addr=\([0-9.]*\).*$/\1/'`
+ break
+ ;;
+ *)
+ ;;
+ esac
+ fi
+done
+exec 0<&9 9<&-
+
+test $nfsroot -eq 0 && exit 0
+
+if [ -x /bin/ip -o -x /sbin/ip ] ; then
+ nfs_iface=`ip route get $nfs_addr | grep dev | sed -e 's/^.*dev \([-a-z0-9.]*\).*$/\1/'`
+fi
+
+if test "x$IFACE" = "x$nfs_iface" ; then
+ echo "ifup skipped for nfsroot interface $nfs_iface"
+ exit 1
+fi
+
+exit 0
diff --git a/meta/recipes-core/netbase/netbase-5.0/qemuarm/interfaces b/meta/recipes-core/netbase/netbase-5.0/qemuarm/interfaces
new file mode 100644
index 0000000000..16967763e5
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase-5.0/qemuarm/interfaces
@@ -0,0 +1,5 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
diff --git a/meta/recipes-core/netbase/netbase-5.0/qemuarmv6/interfaces b/meta/recipes-core/netbase/netbase-5.0/qemuarmv6/interfaces
new file mode 100644
index 0000000000..16967763e5
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase-5.0/qemuarmv6/interfaces
@@ -0,0 +1,5 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
diff --git a/meta/recipes-core/netbase/netbase-5.0/qemuarmv7/interfaces b/meta/recipes-core/netbase/netbase-5.0/qemuarmv7/interfaces
new file mode 100644
index 0000000000..16967763e5
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase-5.0/qemuarmv7/interfaces
@@ -0,0 +1,5 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
diff --git a/meta/recipes-core/netbase/netbase-5.0/qemumips/interfaces b/meta/recipes-core/netbase/netbase-5.0/qemumips/interfaces
new file mode 100644
index 0000000000..f62b9a897d
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase-5.0/qemumips/interfaces
@@ -0,0 +1,8 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+
+
diff --git a/meta/recipes-core/netbase/netbase-5.0/qemumips64/interfaces b/meta/recipes-core/netbase/netbase-5.0/qemumips64/interfaces
new file mode 100644
index 0000000000..f62b9a897d
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase-5.0/qemumips64/interfaces
@@ -0,0 +1,8 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+
+
diff --git a/meta/recipes-core/netbase/netbase-5.0/qemuppc/interfaces b/meta/recipes-core/netbase/netbase-5.0/qemuppc/interfaces
new file mode 100644
index 0000000000..f62b9a897d
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase-5.0/qemuppc/interfaces
@@ -0,0 +1,8 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+
+
diff --git a/meta/recipes-core/netbase/netbase-5.0/qemush4/interfaces b/meta/recipes-core/netbase/netbase-5.0/qemush4/interfaces
new file mode 100644
index 0000000000..f62b9a897d
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase-5.0/qemush4/interfaces
@@ -0,0 +1,8 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+
+
diff --git a/meta/recipes-core/netbase/netbase-5.0/qemux86-64/interfaces b/meta/recipes-core/netbase/netbase-5.0/qemux86-64/interfaces
new file mode 100644
index 0000000000..f62b9a897d
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase-5.0/qemux86-64/interfaces
@@ -0,0 +1,8 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+
+
diff --git a/meta/recipes-core/netbase/netbase-5.0/qemux86/interfaces b/meta/recipes-core/netbase/netbase-5.0/qemux86/interfaces
new file mode 100644
index 0000000000..f62b9a897d
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase-5.0/qemux86/interfaces
@@ -0,0 +1,8 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+
+