summaryrefslogtreecommitdiff
path: root/package/radvd/files/radvd.init
diff options
context:
space:
mode:
Diffstat (limited to 'package/radvd/files/radvd.init')
-rw-r--r--package/radvd/files/radvd.init29
1 files changed, 29 insertions, 0 deletions
diff --git a/package/radvd/files/radvd.init b/package/radvd/files/radvd.init
new file mode 100644
index 000000000..ba2b60535
--- /dev/null
+++ b/package/radvd/files/radvd.init
@@ -0,0 +1,29 @@
+#!/bin/sh
+#FWINIT 51
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${radvd:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
+ /usr/sbin/radvd
+ ;;
+
+stop)
+ killall radvd
+ echo 0 > /proc/sys/net/ipv6/conf/all/forwarding
+ ;;
+
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+esac
+exit $?