summaryrefslogtreecommitdiff
path: root/package/busybox/files/network.init
diff options
context:
space:
mode:
Diffstat (limited to 'package/busybox/files/network.init')
-rw-r--r--package/busybox/files/network.init25
1 files changed, 25 insertions, 0 deletions
diff --git a/package/busybox/files/network.init b/package/busybox/files/network.init
new file mode 100644
index 000000000..0f3d4edad
--- /dev/null
+++ b/package/busybox/files/network.init
@@ -0,0 +1,25 @@
+#!/bin/sh
+#FWINIT 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)
+ ifdown -a
+ ;;
+restart)
+ sh $0 stop
+ exec sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?