ALT Linux repos
S: | 1.2.4-alt5 |
5.0: | 0.99.11-alt3 |
4.1: | 0.99.18-alt0.M41.2 |
4.0: | 0.99.18-alt0.M40.1 |
3.0: | |
+backports: | 0.99.9-alt0.M30.4 |
Group :: Networking/Other
RPM: quagga
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
#!/bin/sh
# chkconfig: - 56 56
# description: Babel routing daemon for use with Quagga
# processname: babeld
# config: /etc/quagga/babeld.conf
# pidfile: /var/lib/quagga/babeld.pid
### BEGIN INIT INFO
# Provides: babeld
# Required-Start: $network
# Required-Stop: $network
# Default-Start:
# Default-Stop:
# Short-Description: Start babeld at boot time
# Description: Enable Babel routing.
### END INIT INFO
# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1
# Source function library.
. /etc/init.d/functions
# Source networking configuration.
SourceIfNotEmpty /etc/sysconfig/network
# quagga command line options
SourceIfNotEmpty /etc/sysconfig/quagga
ZNAME=babeld
# Config is a must to run
[ -f /etc/quagga/$ZNAME.conf ] || exit 0
RETVAL=0
PIDFILE=/var/lib/quagga/$ZNAME.pid
LOCKFILE=/var/lock/subsys/$ZNAME
start()
{
is_yes "$NETWORKING" || return 0
start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user quagga -- $ZNAME --daemon $BABELD_OPTS
RETVAL=$?
return $RETVAL
}
stop()
{
stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user quagga -- $ZNAME
RETVAL=$?
return $RETVAL
}
restart()
{
$ZNAME --dryrun &>/dev/null
RETVAL=$?
if [ $[ $RETVAL > 0 ] == 1 ]; then
echo "Service $ZNAME is not restarted: config's test failed. Try '$ZNAME --dryrun'"
exit $RETVAL
fi
stop
start
}
reload()
{
$ZNAME --dryrun &>/dev/null
RETVAL=$?
if [ $[ $RETVAL > 0 ] == 1 ]; then
echo "Service $ZNAME is not reloaded: config's test failed. Try '$ZNAME --dryrun'"
exit $RETVAL
fi
msg_reloading $ZNAME
stop_daemon -HUP $ZNAME
RETVAL=$?
return $RETVAL
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
reload)
reload
;;
restart)
restart
;;
condstop)
# Stop the servce if it is already running
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condrestart|condreload)
# Restart the servce if it is already running
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
status)
# report the status of the daemons in free-form format
status --pidfile "$PIDFILE" --expect-user quagga -- $ZNAME
RETVAL=$?
;;
*)
msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}"
RETVAL=1
esac
exit $RETVAL