resync gpsd with old trunk version
[openwrt/svn-archive/archive.git] / ipv6 / mrd6 / files / mrd6.init
index 886723f15e9ebbf163fe7d2ef8517b4e3da336ca..9d6519949fa94b720d0dcea304598cbcedca3e2e 100755 (executable)
@@ -1,29 +1,21 @@
-#!/bin/sh
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
 
-case $1 in
-start)
-        /sbin/lsmod | grep ipv6 > /dev/null
-        if [ "$?" != "0" ]
-        then
-          echo -n "IPv6 stack required by mrd6. Loading ipv6 module: "
-          /sbin/insmod ipv6
-          echo "Done."
-        fi
-        echo -n "Starting IPv6 multicast router (mrd6): "
+start() {
+       /sbin/lsmod | grep ipv6 > /dev/null
+       if [ "$?" != "0" ]; then
+               echo -n "IPv6 stack required by mrd6. Loading ipv6 module: "
+               /sbin/insmod ipv6
+               echo "Done."
+       fi
+       echo -n "Starting IPv6 multicast router (mrd6): "
        /usr/sbin/mrd6 -f /etc/mrd6.conf -D
-        echo "Done."
-        ;;
-stop)
-        echo -n "Stopping IPv6 multicast router (mrd6): "
+       echo "Done."
+}
+
+stop() {
+       echo -n "Stopping IPv6 multicast router (mrd6): "
        killall mrd6
-        echo "Done."
-        ;;
-restart)
-        $0 stop
-        $0 start
-        ;;
-*)
-        echo "Usage: $0 {start | stop | restart}"
-        ;;
-esac
-exit 0
+       echo "Done."
+}
+