summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/netbase/netbase/init
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-core/netbase/netbase/init
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadpoky-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-core/netbase/netbase/init')
-rw-r--r--meta/recipes-core/netbase/netbase/init52
1 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-core/netbase/netbase/init b/meta/recipes-core/netbase/netbase/init
new file mode 100644
index 0000000000..8a67e1cef2
--- /dev/null
+++ b/meta/recipes-core/netbase/netbase/init
@@ -0,0 +1,52 @@
1#!/bin/sh
2#
3### BEGIN INIT INFO
4# Provides: networking
5# Required-Start: $local_fs mountvirtfs
6# Required-Stop: $local_fs
7# Default-Start: S
8# Default-Stop: 0 6
9# Short-Description: Raise network interfaces and configure them
10### END INIT INFO
11
12PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
13
14if ! [ -x /sbin/ifup ]; then
15 exit 0
16fi
17
18case "$1" in
19 start)
20 echo -n "Configuring network interfaces... "
21 ifup -a
22 echo "done."
23 ;;
24 stop)
25 if sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |
26 grep -q "^/ nfs$"; then
27 echo "NOT deconfiguring network interfaces: / is an NFS mount"
28 elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |
29 grep -q "^/ smbfs$"; then
30 echo "NOT deconfiguring network interfaces: / is an SMB mount"
31 elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts |
32 grep -qE '^(nfs|smbfs|ncp|coda)$'; then
33 echo "NOT deconfiguring network interfaces: network shares still mounted."
34 else
35 echo -n "Deconfiguring network interfaces... "
36 ifdown -a
37 echo "done."
38 fi
39 ;;
40 force-reload|restart)
41 echo -n "Reconfiguring network interfaces... "
42 ifdown -a
43 ifup -a
44 echo "done."
45 ;;
46 *)
47 echo "Usage: /etc/init.d/networking {start|stop|restart|force-reload}"
48 exit 1
49 ;;
50esac
51
52exit 0