Sophie

Sophie

distrib > CentOS > 5 > i386 > media > os > by-pkgid > dc2bf8153ee9821dcec2a38c9b637b33 > files > 15

quagga-0.98.6-11.el5.i386.rpm

#!/bin/bash
#
# chkconfig: - 16 84
# description: A RIP routing engine for use with Zebra
#
# processname: ripd
# config: /etc/quagga/ripd.conf

# source function library
. /etc/rc.d/init.d/functions

# Get network config
. /etc/sysconfig/network

# quagga command line options
. /etc/sysconfig/quagga

RETVAL=0
prog="ripd"

case "$1" in
  start)
	# Check that networking is up.
	[ "${NETWORKING}" = "no" ] && exit 1

	# The process must be configured first.
	[ -f $QCONFDIR/ripd.conf ] || exit 6

	echo -n $"Starting $prog: "
        daemon /usr/sbin/ripd -d $RIPD_OPTS
	RETVAL=$?
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ripd
	echo
	;;
  stop)
	echo -n $"Shutting down $prog: "
	killproc -p /var/run/quagga/ripd.pid ripd
	RETVAL=$?
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ripd
	echo
	;;
  restart|reload)
        $0 stop
        $0 start
	RETVAL=$?
        ;;
  condrestart)
        if [ -f /var/lock/subsys/ripd ]; then
                $0 stop
		$0 start
        fi
	RETVAL=$?
        ;;
  status)
        status ripd
	RETVAL=$?
        ;;
  *)
	echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
	exit 2
esac

exit $RETVAL