summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/netbase/netbase-5.0/init
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:37:28 +0000
commit4cb7c9a7ca3632c15414177e6e3ee399ad48ba08 (patch)
treeb69eaf83119f8b92cddd9ce8ad7a99d265668937 /meta/recipes-core/netbase/netbase-5.0/init
parent7c106a3bb8a427321db579b682adfb4a2bd1eddc (diff)
downloadpoky-4cb7c9a7ca3632c15414177e6e3ee399ad48ba08.tar.gz
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] (From OE-Core rev: 5ce5c3d1226d4a8a4997c63acc1b1b125770d005) 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/netbase-5.0/init')
-rw-r--r--meta/recipes-core/netbase/netbase-5.0/init89
1 files changed, 0 insertions, 89 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 @@
1#!/bin/sh -e
2### BEGIN INIT INFO
3# Provides: networking
4# Required-Start: mountvirtfs $local_fs
5# Required-Stop: $local_fs
6# Should-Start: ifupdown
7# Should-Stop: ifupdown
8# Default-Start: S
9# Default-Stop: 0 6
10# Short-Description: Raise network interfaces.
11### END INIT INFO
12
13PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
14
15[ -x /sbin/ifup ] || exit 0
16
17check_network_file_systems() {
18 [ -e /proc/mounts ] || return 0
19
20 if [ -e /etc/iscsi/iscsi.initramfs ]; then
21 echo "not deconfiguring network interfaces: iSCSI root is mounted."
22 exit 0
23 fi
24
25 exec 9<&0 < /proc/mounts
26 while read DEV MTPT FSTYPE REST; do
27 case $DEV in
28 /dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)
29 echo "not deconfiguring network interfaces: network devices still mounted."
30 exit 0
31 ;;
32 esac
33 case $FSTYPE in
34 nfs|nfs4|smbfs|ncp|ncpfs|cifs|coda|ocfs2|gfs|pvfs|pvfs2|fuse.httpfs|fuse.curlftpfs)
35 echo "not deconfiguring network interfaces: network file systems still mounted."
36 exit 0
37 ;;
38 esac
39 done
40 exec 0<&9 9<&-
41}
42
43check_network_swap() {
44 [ -e /proc/swaps ] || return 0
45
46 exec 9<&0 < /proc/swaps
47 while read DEV MTPT FSTYPE REST; do
48 case $DEV in
49 /dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)
50 echo "not deconfiguring network interfaces: network swap still mounted."
51 exit 0
52 ;;
53 esac
54 done
55 exec 0<&9 9<&-
56}
57
58case "$1" in
59start)
60 echo -n "Configuring network interfaces... "
61 ifup -a
62 echo "done."
63 ;;
64
65stop)
66 check_network_file_systems
67 check_network_swap
68
69 echo -n "Deconfiguring network interfaces... "
70 ifdown -a
71 echo "done."
72 ;;
73
74force-reload|restart)
75 echo "Running $0 $1 is deprecated because it may not enable again some interfaces"
76 echo "Reconfiguring network interfaces... "
77 ifdown -a || true
78 ifup -a
79 echo "done."
80 ;;
81
82*)
83 echo "Usage: /etc/init.d/networking {start|stop}"
84 exit 1
85 ;;
86esac
87
88exit 0
89