summaryrefslogtreecommitdiff
path: root/package/busybox/files/network
diff options
context:
space:
mode:
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 $?