]> git.pld-linux.org Git - packages/quagga.git/blame - quagga-ripngd.init
- removed temporary files
[packages/quagga.git] / quagga-ripngd.init
CommitLineData
d25518fe
AM
1#!/bin/sh
2#
419faeec 3# ripngd Starts the Dynamic Route Daemon
d25518fe 4#
99171fdc 5# chkconfig: 345 15 84
d25518fe
AM
6#
7# description: Dynamic Route Daemon for IPv4 and IPv6 routers
8#
9# processname: ripngd
10# config: /etc/ripngd/ripngd.conf
11
12
13# Source function library
14. /etc/rc.d/init.d/functions
15
16# Get network config
17. /etc/sysconfig/network
18
19# Get service config
20[ -f /etc/sysconfig/ripngd ] && . /etc/sysconfig/ripngd
21
22# Check that networking is up.
23if is_yes "${NETWORKING}"; then
24 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
d25518fe
AM
25 msg_network_down ripngd
26 exit 1
27 fi
28else
29 exit 0
30fi
31
32RETVAL=0
33# See how we were called.
34case "$1" in
35 start)
36 # Check if the services are already running?
37 if [ ! -f /var/lock/subsys/ripngd ]; then
38 FLAGS="--daemon"
39 is_yes "$RETAIN_ROUTES" && FLAGS="$FLAGS --retain"
8874d3e5 40 [ -n "$VTY_ADDR" ] && FLAGS="$FLAGS --vty_addr $VTY_ADDR"
41 [ -n "$VTY_PORT" ] && FLAGS="$FLAGS --vty_port $VTY_PORT"
d25518fe 42 msg_starting ripngd
419faeec 43 daemon ripngd $FLAGS
d25518fe
AM
44 RETVAL=$?
45 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ripngd
46 else
47 msg_already_running "ripngd"
48 fi
49 ;;
50 stop)
51 if [ -f /var/lock/subsys/ripngd ]; then
52 # Stop daemons.
53 msg_stopping "ripngd"
54 killproc ripngd
55 rm -f /var/lock/subsys/ripngd
56 else
57 msg_not_running ripngd
58 fi
59 ;;
60 status)
61 status ripngd
62 exit $?
63 ;;
64 restart|force-reload)
65 $0 stop
66 $0 start
67 exit $?
68 ;;
69 *)
70 msg_usage "$0 {start|stop|restart|force-reload|status}"
71 exit 3
72esac
73
74exit $RETVAL
This page took 0.072822 seconds and 4 git commands to generate.