summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/netbase
diff options
context:
space:
mode:
authorConstantin Musca <constantinx.musca@intel.com>2013-02-04 19:13:20 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-06 09:36:32 +0000
commit5ce5c3d1226d4a8a4997c63acc1b1b125770d005 (patch)
treec1cdd95c32b7a48f1befa7ddf4a164be92e80469 /meta/recipes-core/netbase
parenta9591158962eee1f8ae04168d6256032ecd7bc6b (diff)
downloadopenembedded-core-5ce5c3d1226d4a8a4997c63acc1b1b125770d005.tar.gz
openembedded-core-5ce5c3d1226d4a8a4997c63acc1b1b125770d005.tar.bz2
openembedded-core-5ce5c3d1226d4a8a4997c63acc1b1b125770d005.zip
netbase: split up in netbase and init-ifupdown
- netbase should only include etc-rpc, etc-protocols, etc-services and the hosts file - the init script/configuration files should be in another package (init-ifupdown) [YOCTO #2486] Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/netbase')
-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
-rw-r--r--meta/recipes-core/netbase/netbase_5.0.bb32
13 files changed, 4 insertions, 250 deletions
diff --git a/meta/recipes-core/netbase/netbase-5.0/init b/meta/recipes-core/netbase/netbase-5.0/init
deleted file mode 100644
index bace9df991..0000000000
--- a/meta/recipes-core/netbase/netbase-5.0/init
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/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
deleted file mode 100644
index 0acf4cf441..0000000000
--- a/meta/recipes-core/netbase/netbase-5.0/interfaces
+++ /dev/null
@@ -1,31 +0,0 @@
-# /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
deleted file mode 100644
index 750c0a98f9..0000000000
--- a/meta/recipes-core/netbase/netbase-5.0/nfsroot
+++ /dev/null
@@ -1,39 +0,0 @@
-#! /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
deleted file mode 100644
index 16967763e5..0000000000
--- a/meta/recipes-core/netbase/netbase-5.0/qemuarm/interfaces
+++ /dev/null
@@ -1,5 +0,0 @@
-# /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
deleted file mode 100644
index 16967763e5..0000000000
--- a/meta/recipes-core/netbase/netbase-5.0/qemuarmv6/interfaces
+++ /dev/null
@@ -1,5 +0,0 @@
-# /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
deleted file mode 100644
index 16967763e5..0000000000
--- a/meta/recipes-core/netbase/netbase-5.0/qemuarmv7/interfaces
+++ /dev/null
@@ -1,5 +0,0 @@
-# /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
deleted file mode 100644
index f62b9a897d..0000000000
--- a/meta/recipes-core/netbase/netbase-5.0/qemumips/interfaces
+++ /dev/null
@@ -1,8 +0,0 @@
-# /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
deleted file mode 100644
index f62b9a897d..0000000000
--- a/meta/recipes-core/netbase/netbase-5.0/qemumips64/interfaces
+++ /dev/null
@@ -1,8 +0,0 @@
-# /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
deleted file mode 100644
index f62b9a897d..0000000000
--- a/meta/recipes-core/netbase/netbase-5.0/qemuppc/interfaces
+++ /dev/null
@@ -1,8 +0,0 @@
-# /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
deleted file mode 100644
index f62b9a897d..0000000000
--- a/meta/recipes-core/netbase/netbase-5.0/qemush4/interfaces
+++ /dev/null
@@ -1,8 +0,0 @@
-# /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
deleted file mode 100644
index f62b9a897d..0000000000
--- a/meta/recipes-core/netbase/netbase-5.0/qemux86-64/interfaces
+++ /dev/null
@@ -1,8 +0,0 @@
-# /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
deleted file mode 100644
index f62b9a897d..0000000000
--- a/meta/recipes-core/netbase/netbase-5.0/qemux86/interfaces
+++ /dev/null
@@ -1,8 +0,0 @@
-# /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.bb b/meta/recipes-core/netbase/netbase_5.0.bb
index 3aea87412d..03fdc38a67 100644
--- a/meta/recipes-core/netbase/netbase_5.0.bb
+++ b/meta/recipes-core/netbase/netbase_5.0.bb
@@ -5,44 +5,20 @@ SECTION = "base"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://debian/copyright;md5=3dd6192d306f582dee7687da3d8748ab"
PR = "r0"
-
-inherit update-rc.d
-
-INITSCRIPT_NAME = "networking"
-INITSCRIPT_PARAMS = "start 40 S . stop 40 0 6 1 ."
+PE = "1"
SRC_URI = "${DEBIAN_MIRROR}/main/n/netbase/netbase_${PV}.tar.gz \
- file://init \
- file://hosts \
- file://interfaces \
- file://nfsroot"
+ file://hosts"
SRC_URI[md5sum] = "a379d9199d44d817543eddc211a29b70"
SRC_URI[sha256sum] = "ac9424d3cb2bd3c07b6c5bc5875c434d3bc687a73cd7c54b7dc7122308afa9dc"
do_install () {
- install -d ${D}${sysconfdir}/init.d \
- ${D}${mandir}/man8 \
- ${D}${sysconfdir}/network/if-pre-up.d \
- ${D}${sysconfdir}/network/if-up.d \
- ${D}${sysconfdir}/network/if-down.d \
- ${D}${sysconfdir}/network/if-post-down.d
- install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/networking
+ install -d ${D}/${mandir}/man8 ${D}${sysconfdir}
install -m 0644 ${WORKDIR}/hosts ${D}${sysconfdir}/hosts
install -m 0644 etc-rpc ${D}${sysconfdir}/rpc
install -m 0644 etc-protocols ${D}${sysconfdir}/protocols
install -m 0644 etc-services ${D}${sysconfdir}/services
- install -m 0644 ${WORKDIR}/interfaces ${D}${sysconfdir}/network/interfaces
- install -m 0755 ${WORKDIR}/nfsroot ${D}${sysconfdir}/network/if-pre-up.d
-
- # Disable network manager on machines that commonly do NFS booting
- case "${MACHINE}" in
- "qemuarm*" | "qemux86" | "qemux86-64" | "qemumips*" | "qemuppc" | "qemush*")
- touch ${D}${sysconfdir}/network/nm-disabled-eth0
- ;;
- *)
- ;;
- esac
}
-CONFFILES_${PN} = "${sysconfdir}/hosts ${sysconfdir}/network/interfaces"
+CONFFILES_${PN} = "${sysconfdir}/hosts"