#!/bin/sh # # radvd router advertisement daemon for IPv6. # # 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 # config: /etc/radvd.conf # pidfile: /var/run/radvd/radvd.pid # Do not load RH compatibility interface. WITHOUT_RC_COMPAT=1 # Source function library. . /etc/init.d/functions PIDFILE=/var/run/radvd/radvd.pid LOCKFILE=/var/lock/subsys/radvd RETVAL=0 SourceIfNotEmpty /etc/sysconfig/radvd start() { start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- radvd "$OPTIONS" RETVAL=$? return $RETVAL } stop() { stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user _radvd -- radvd RETVAL=$? return $RETVAL } restart() { stop start } reload() { msg_reloading radvd stop_daemon --pidfile "$PIDFILE" --expect-user root -HUP -- radvd RETVAL=$? return $RETVAL } # See how we were called. case "$1" in start) start ;; stop) stop ;; reload) reload ;; restart) restart ;; condstop) if [ -e "$LOCKFILE" ]; then stop fi ;; condrestart) if [ -e "$LOCKFILE" ]; then restart fi ;; condreload) if [ -e "$LOCKFILE" ]; then reload fi ;; status) status --pidfile "$PIDFILE" --expect-user _radvd -- radvd RETVAL=$? ;; *) msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}" RETVAL=1 esac exit $RETVAL