blob: 57ae928c72e9c0e78e3fe01fe2eae255da4d7658 [file] [log] [blame]
paul788cdc62003-01-18 00:22:08 +00001#!/bin/bash
2#
paul15d74e92003-12-30 11:16:21 +00003# chkconfig: 2345 16 84
paul788cdc62003-01-18 00:22:08 +00004# description: A RIP routing engine for use with Zebra and IPv6
5#
6# processname: ripngd
paule835d102003-08-14 05:24:30 +00007# config: /etc/quagga/ripngd.conf
paul788cdc62003-01-18 00:22:08 +00008
9# source function library
10. /etc/rc.d/init.d/functions
11
12# Get network config
13. /etc/sysconfig/network
14
paul15d74e92003-12-30 11:16:21 +000015# quagga command line options
16. /etc/sysconfig/quagga
17
paul788cdc62003-01-18 00:22:08 +000018# Check that networking is up.
19[ "${NETWORKING_IPV6}" = "no" ] && exit 0
20
21# The process must be configured first.
paule835d102003-08-14 05:24:30 +000022[ -f /etc/quagga/ripngd.conf ] || exit 0
paul788cdc62003-01-18 00:22:08 +000023
24RETVAL=0
25prog="ripngd"
26
27case "$1" in
28 start)
29 echo -n $"Starting $prog: "
paul15d74e92003-12-30 11:16:21 +000030 daemon /usr/sbin/ripngd -d $RIPNGD_OPTS
paul788cdc62003-01-18 00:22:08 +000031 RETVAL=$?
32 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ripngd
33 echo
34 ;;
35 stop)
36 echo -n $"Shutting down $prog: "
37 killproc ripngd
38 RETVAL=$?
39 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ripngd
40 echo
41 ;;
42 restart|reload)
43 $0 stop
44 $0 start
45 RETVAL=$?
46 ;;
47 condrestart)
48 if [ -f /var/lock/subsys/ripngd ]; then
49 $0 stop
50 $0 start
51 fi
52 RETVAL=$?
53 ;;
54 status)
55 status ripngd
56 RETVAL=$?
57 ;;
58 *)
59 echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
60 exit 1
61esac
62
63exit $RETVAL