summaryrefslogtreecommitdiff
path: root/package/busybox/files/network
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-04-07 17:23:11 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-04-07 17:23:11 +0200
commitf3cc98651b738ac7f2dc56ea772afa9f874b9d3b (patch)
tree02fcb02d1a7db02e09355c88e5a4f66f54079d6f /package/busybox/files/network
parent5bcfd51dfd2fb526705540ec690e2798a3074e55 (diff)
allow to enable daemons on startup via menuconfig
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 $?