Blame | Last modification | View Log | RSS feed
#!/bin/bash## $Id$#### BEGIN INIT INFO# Provides: rdisc# Short-Description: This is a daemon which discovers routers on the local subnet.# Description: This is a daemon which discovers routers on the local subnet.### END INIT INFO# chkconfig: - 41 89# config: /etc/sysconfig/rdisc# Source function library.. /etc/init.d/functions. /etc/sysconfig/network## Set default options. Override the defaults and define# custom options in /etc/sysconfig/rdisc#RDISCOPTS="-s"LOCKFILE=/var/lock/subsys/rdisc[ -f /etc/sysconfig/rdisc ] && . /etc/sysconfig/rdiscstart() {# Check that networking is configured.[ ${NETWORKING} = "no" ] && exit 1echo -n $"Starting router discovery: "if [ $UID -ne 0 ]; thenRETVAL=4failureelsedaemon /sbin/rdisc $RDISCOPTSRETVAL=$?[ $RETVAL -eq 0 ] && touch $LOCKFILEfi;echoreturn $RETVAL}stop() {echo -n $"Shutting down router discovery services: "if [ $UID -ne 0 ]; thenRETVAL=4failureelsekillproc /sbin/rdiscRETVAL=$?[ $RETVAL -eq 0 ] && rm -f $LOCKFILEfi;echoreturn $RETVAL}restart() {stopstart}RETVAL=0# See how we were called.case "$1" instart)start;;stop)stop;;status)status rdisc;;restart|reload)restart;;condrestart)if status $prog > /dev/null; thenstopstartfi;;*)echo $"Usage: $0 {start|stop|status|restart|reload}"exit 2esacexit $?