Blame | Last modification | View Log | RSS feed
#! /bin/sh## $Id: radvd.init,v 1.7 2010/03/05 12:14:47 psavola Exp $## chkconfig: - 54 46# description: radvd is the router advertisement daemon for IPv6. It \# listens to router solicitations and sends router \# advertisements as described in "Neighbor Discovery for IP \# Version 6 (IPv6)" (RFC 2461). With these advertisements \# hosts can automatically configure their addresses and some \# other parameters. They also can choose a default router \# based on these advertisements.## processname: radvd# pidfile: /var/run/radvd/radvd.pid# config: /etc/radvd.conf# config: /etc/sysconfig/radvd### BEGIN INIT INFO# Provides: radvd# Short-Description: router advertisement daemon for IPv6### END INIT INFO# Source function library.. /etc/rc.d/init.d/functions# Get config.. /etc/sysconfig/network[ -f /etc/sysconfig/radvd ] && . /etc/sysconfig/radvdRETVAL=0PROG="radvd"LOCKFILE=/var/lock/subsys/radvdPIDFILE=/var/run/radvd/radvd.pid# See how we were called.case "$1" instart)if [ ! -f /etc/radvd.conf ]; thenecho $"Configuration file /etc/radvd.conf missing" 1>&2exit 6fiif [ `id -u` -ne 0 ]; thenecho $"Insufficient privilege" 1>&2exit 4fiecho -n $"Starting $PROG: "daemon radvd $OPTIONSRETVAL=$?echoif [ $RETVAL -eq 0 ]; thentouch $LOCKFILEelseif [ -f $LOCKFILE ]; thenRETVAL=0fifi;;stop)echo -n $"Stopping $PROG: "killproc radvdRETVAL=$?echo[ $RETVAL -eq 0 ] && rm -f $LOCKFILE;;status)status -p $PIDFILE radvdRETVAL=$?;;restart)$0 stop$0 startRETVAL=$?;;reload|force-reload)echo -n $"Reloading $PROG: "killproc radvd -HUPRETVAL=$?echo;;condrestart|try-restart)if [ -f $LOCKFILE ]; then$0 stop$0 startRETVAL=$?fi;;*)echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"exit 2esacexit $RETVAL