blob: 8e3dae61035462b7e25124a51dad4a588faf3ecb [file] [log] [blame]
paul788cdc62003-01-18 00:22:08 +00001#!/bin/bash
2#
3# chkconfig: - 16 84
4# description: An OSPF v2 routing engine for use with Zebra
5#
6# processname: ospfd
paule835d102003-08-14 05:24:30 +00007# config: /etc/quagga/ospfd.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
15# Check that networking is up.
16[ "${NETWORKING}" = "no" ] && exit 0
17
18# The process must be configured first.
paule835d102003-08-14 05:24:30 +000019[ -f /etc/quagga/ospfd.conf ] || exit 0
paul788cdc62003-01-18 00:22:08 +000020
21RETVAL=0
22
23prog="ospfd"
24
25case "$1" in
26 start)
27 echo -n $"Starting $prog: "
28 daemon /usr/sbin/ospfd -d
29 RETVAL=$?
30 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ospfd
31 echo
32 ;;
33 stop)
34 echo -n $"Shutting down $prog: "
35 killproc ospfd
36 RETVAL=$?
37 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ospfd
38 echo
39 ;;
40 restart|reload)
41 $0 stop
42 $0 start
43 RETVAL=$?
44 ;;
45 condrestart)
46 if [ -f /var/lock/subsys/ospfd ]; then
47 $0 stop
48 $0 start
49 fi
50 RETVAL=$?
51 ;;
52 status)
53 status ospfd
54 RETVAL=$?
55 ;;
56 *)
57 echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
58 exit 1
59esac
60
61exit $RETVAL