Don't enable dnsmasq IPSET functionality on 2.4 kernel
[tomato.git] / release / src / router / radvd / redhat / radvd.init
blobfb40069c17382770d2f869d9c91857352ecb4eb5
1 #! /bin/sh
4 # chkconfig: - 54 46
5 # description: radvd is the router advertisement daemon for IPv6. It \
6 # listens to router solicitations and sends router \
7 # advertisements as described in "Neighbor Discovery for IP \
8 # Version 6 (IPv6)" (RFC 2461). With these advertisements \
9 # hosts can automatically configure their addresses and some \
10 # other parameters. They also can choose a default router \
11 # based on these advertisements.
13 # processname: radvd
14 # pidfile: /var/run/radvd.pid
15 # config: /etc/radvd.conf
16 # config: /etc/sysconfig/radvd
18 ### BEGIN INIT INFO
19 # Provides: radvd
20 # Short-Description: router advertisement daemon for IPv6
21 ### END INIT INFO
23 # Source function library.
24 . /etc/rc.d/init.d/functions
26 # Get config.
27 . /etc/sysconfig/network
29 [ -f /etc/sysconfig/radvd ] && . /etc/sysconfig/radvd
31 RETVAL=0
32 PROG="radvd"
33 LOCKFILE=/var/lock/subsys/radvd
35 # See how we were called.
36 case "$1" in
37 start)
38 if [ ! -f /etc/radvd.conf ]; then
39 echo $"Configuration file /etc/radvd.conf missing" 1>&2
40 exit 6
42 if [ `id -u` -ne 0 ]; then
43 echo $"Insufficient privilege" 1>&2
44 exit 4
46 echo -n $"Starting $PROG: "
47 daemon radvd $OPTIONS
48 RETVAL=$?
49 echo
50 if [ $RETVAL -eq 0 ]; then
51 touch $LOCKFILE
52 else
53 if [ -f $LOCKFILE ]; then
54 RETVAL=0
58 stop)
59 echo -n $"Stopping $PROG: "
60 killproc radvd
61 RETVAL=$?
62 echo
63 [ $RETVAL -eq 0 ] && rm -f $LOCKFILE
65 status)
66 status radvd
67 RETVAL=$?
69 restart)
70 $0 stop
71 $0 start
72 RETVAL=$?
74 reload|force-reload)
75 echo -n $"Reloading $PROG: "
76 killproc radvd -HUP
77 RETVAL=$?
78 echo
80 condrestart|try-restart)
81 if [ -f $LOCKFILE ]; then
82 $0 stop
83 $0 start
84 RETVAL=$?
86 ;;
88 echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
89 exit 2
90 esac
92 exit $RETVAL