Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > af46d7d76684ddf7b7fbf0a1d93b4e8d > files > 4

routed-0.17-14.mga3.src.rpm

#! /bin/sh
#
# chkconfig: - 55 55
# description: The routed daemon allows for automatic IP router table \
#	       updated via the RIP protocol. While RIP is widely used \
#              on small networks, more complex routing protocls are \
#              needed for complex networks.
# processname: routed
# config: /etc/sysconfig/routed
# config: /etc/gateways
### BEGIN INIT INFO
# Provides: routed
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 3 4 5
# Short-Description: RIP Routing daemon
# Description: The routed daemon allows for automatic IP router table
#              updated via the RIP protocol. While RIP is widely used
#              on small networks, more complex routing protocls are
#              needed for complex networks.
### END INIT INFO

# Source function library.
. /etc/rc.d/init.d/functions

# Get config.
. /etc/sysconfig/network

# Check that networking is up.
if [ ${NETWORKING} = "no" ]
then
	exit 0
fi

# Get routed config
[ -f /etc/sysconfig/routed ] && . /etc/sysconfig/routed

RETVAL=0

# See how we were called.
case "$1" in
  start)
	echo -n "Starting routed (RIP) services: "
	case $SILENT in true|yes) silent=-q ;; *) silent= ;; esac
	case $EXPORT_GATEWAY in true|yes) export=-g ;; *) export= ;; esac
	daemon routed $silent $export
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/routed
	;;
  stop)
	echo -n "Stopping routed (RIP) services: "
	killproc routed
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/routed
	;;
  status)
	status routed
	RETVAL=$?
	;;
  restart|reload)
	$0 stop
	$0 start
	RETVAL=$?
	;;
  *)
	echo "Usage: routed {start|stop|status|restart|reload}"
	exit 1
esac

exit $RETVAL