summaryrefslogtreecommitdiff
path: root/package/busybox/files/network
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-04-13 17:18:15 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-04-13 17:18:15 +0200
commit64d6047788b6201a9b026a6841dd25f8d0a0d00b (patch)
tree95aafc346b70447f7dd2829f83f59d8df15d4d58 /package/busybox/files/network
parentd5aed1c97f81f422af91c1bd4d7994dc54beabe1 (diff)
parent7297ef1c47935fb17e49cac8379908e631763566 (diff)
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/busybox/files/network')
-rw-r--r--package/busybox/files/network27
1 files changed, 27 insertions, 0 deletions
diff --git a/package/busybox/files/network b/package/busybox/files/network
new file mode 100644
index 000000000..4989fcbcb
--- /dev/null
+++ b/package/busybox/files/network
@@ -0,0 +1,27 @@
+#!/bin/sh
+#PKG busybox
+#INIT 40
+. /etc/rc.conf
+case $1 in
+autostart)
+ test x"${network:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ [ -f /etc/network/interfaces ] || exit 1
+ ifup -a
+ ;;
+autostop|stop)
+ [ -f /etc/network/interfaces ] || exit 1
+ ifdown -a
+ ;;
+restart)
+ sh $0 stop
+ exec sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?