From 8c559e2ce5e45f8058769c3f9f3a2c8b9f1b8e81 Mon Sep 17 00:00:00 2001 From: paul Date: Sat, 18 Jan 2003 02:08:50 +0000 Subject: renamed ports/redhat to redhat/ --- redhat/zebra.init | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 redhat/zebra.init (limited to 'redhat/zebra.init') diff --git a/redhat/zebra.init b/redhat/zebra.init new file mode 100644 index 00000000..5a450e21 --- /dev/null +++ b/redhat/zebra.init @@ -0,0 +1,61 @@ +#!/bin/bash +# +# chkconfig: - 15 85 +# description: GNU Zebra routing manager +# +# processname: zebra +# config: /etc/zebra/zebra.conf + +# source function library +. /etc/rc.d/init.d/functions + +# Check that networking is up. +[ "${NETWORKING}" = "no" ] && exit 0 + +# The process must be configured first. +[ -f /etc/zebra/zebra.conf ] || exit 0 + +RETVAL=0 + +prog="zebra" + +case "$1" in + start) + echo -n $"Starting $prog: " + + /sbin/ip route flush proto zebra + + daemon /usr/sbin/zebra -d + RETVAL=$? + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/zebra + echo + ;; + stop) + echo -n $"Shutting down $prog: " + killproc zebra + RETVAL=$? + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/zebra + echo + ;; + restart|reload) + $0 stop + $0 start + RETVAL=$? + ;; + condrestart) + if [ -f /var/lock/subsys/zebra ]; then + $0 stop + $0 start + fi + RETVAL=$? + ;; + status) + status zebra + RETVAL=$? + ;; + *) + echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}" + exit 1 +esac + +exit $RETVAL -- cgit v1.2.1