Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37745893
en ru br
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: IPv6 OSPF routing daemon for use with Quagga
# processname: ospf6d
# config: /etc/quagga/ospf6d.conf
# pidfile: /var/lib/quagga/ospf6d.pid

### BEGIN INIT INFO
# Provides: ospf6d
# Required-Start: $network
# Required-Stop: $network
# Default-Start:
# Default-Stop:
# Short-Description: Start bgpd at boot time
# Description: Enable IPv6 OSPF 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=ospf6d

# 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_IPV6" || return 0
start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user quagga -- $ZNAME --daemon $OSPF6D_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
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin