#!/bin/sh # # radvd Start/stop the IPv6 Router ADvertisement Daemon # # chkconfig: 345 25 75 # description: The IPv6 Route ADvertisement Daemon helps you \ # to autoconfigure your IPv6 clients on \ # connected subnet(s) # processname: radvd # # (P) & (C) 1997-2000 by Peter Bieringer # http://www.gnu.org/copyleft/gpl.html # as long as the hints taken from Red Hat scripts are not restrictively # copyrighted # # Suggestions, comments and improvements are welcome! # # You will find more information in the IPv6-HowTo for Linux at # http://www.bieringer.de/linux/IPv6/ # # Location of this script: # RedHat 6.x: /etc/rc.d/init.d # # Permissions: 755 # Owner: root:root # # Changelog: Version 1.13 # 1.10: Merge into DLD 5.4 # 1.11: Updates for dual usage (DLD 5.4 or another RedHat compatible system) # 1.12: Bugfix, don't used the switch from network-ip6 # 19990626: RedHat 6.0 review # 20000726: RedHat 6.2 adaption + review # 20001125: explicitly GPL'ed ## Defines # Location of radvd binary BINRADVD="/usr/local/sbin/radvd" # Location of radvd config file CONFRADVD="/etc/radvd.conf" # Additional RADVD options (see manpage for more details= OPTIONSRADVD="" # No additional option #OPTIONSRADVD="-d 9" # Set debug level to 9 # set -x # Source function library. . /etc/rc.d/init.d/functions # Get config. . /etc/sysconfig/network # Check that networking is enabled if [ ! ${NETWORKING} = "yes" ]; then exit 0; fi # Check that IPv6 networking is enabled if [ ! ${NETWORKING_IPV6} = "yes" ]; then exit 0; fi # Check for executable given binary if [ ! -x $BINRADVD ]; then echo -e "\a Missing binary '$BINRADVD'" exit 1 fi # Check for existing configuration file if [ ! -f $CONFRADVD ]; then echo -e "\a Missing configuration file '$CONFRADVD'" exit 1 fi # See how we were called. case "$1" in start) echo -n "Start IPv6-Router Advertisement Daemon" # Start daemon daemon $BINRADVD -C $CONFRADVD $OPTIONSRADVD RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/radvd ;; stop) echo -n "Stop IPv6-Router Advertisement Daemon" killproc radvd RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/radvd ;; restart|reload) $0 stop $0 start RETVAL=$? ;; *) echo "Usage: radvd {start|stop|restart|reload}" exit 1 ;; esac exit $RETVAL