blob: 4aab13887c573e5207f9430783f9b34083e24cad [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
7# config: /etc/zebra/ospfd.conf
8
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.
19[ -f /etc/zebra/ospfd.conf ] || exit 0
20
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