source: freewrt/package/mrd6/files/mrd6.init@ 583d755

freewrt_1_0 freewrt_2_0
Last change on this file since 583d755 was 583d755, checked in by Thorsten Glaser <tg@…>, 19 years ago
  • change the SYSV init system to add a target "autostart"
  • on system startup, call autostart instead of start
  • on autostart, check /etc/rc.conf for whether the service is enabled and act appropriately; fall through into start target
  • move some pre-startup checks into the start target
  • some whitespace cleanup, when it makes much sense (XXX when I get the person who wrote these scripts...)
  • optimise dropbear a little

ok and approved wbx@

git-svn-id: svn://www.freewrt.org/trunk/freewrt@191 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100755
File size: 622 bytes
Line 
1#!/bin/sh
2
3case $1 in
4autostart|start)
5 /sbin/lsmod | grep ipv6 > /dev/null
6 if [ "$?" != "0" ]
7 then
8 echo -n "IPv6 stack required by mrd6. Loading ipv6 module: "
9 /sbin/insmod ipv6
10 echo "Done."
11 fi
12 echo -n "Starting IPv6 multicast router (mrd6): "
13 /usr/sbin/mrd6 -f /etc/mrd6.conf -D
14 echo "Done."
15 ;;
16stop)
17 echo -n "Stopping IPv6 multicast router (mrd6): "
18 killall mrd6
19 echo "Done."
20 ;;
21restart)
22 $0 stop
23 $0 start
24 ;;
25*)
26 echo "Usage: $0 {start | stop | restart}"
27 ;;
28esac
29exit 0
Note: See TracBrowser for help on using the repository browser.