]> git.pld-linux.org Git - packages/quagga.git/blob - quagga-ripngd.init
- removed temporary files
[packages/quagga.git] / quagga-ripngd.init
1 #!/bin/sh
2 #
3 # ripngd                Starts the Dynamic Route Daemon
4 #
5 # chkconfig:    345 15 84
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.
23 if is_yes "${NETWORKING}"; then
24         if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
25                 msg_network_down ripngd
26                 exit 1
27         fi
28 else
29         exit 0
30 fi
31
32 RETVAL=0
33 # See how we were called.
34 case "$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"
40                 [ -n "$VTY_ADDR" ] && FLAGS="$FLAGS --vty_addr $VTY_ADDR"
41                 [ -n "$VTY_PORT" ] && FLAGS="$FLAGS --vty_port $VTY_PORT"
42                 msg_starting ripngd
43                 daemon ripngd $FLAGS
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
72 esac
73
74 exit $RETVAL
This page took 0.029179 seconds and 3 git commands to generate.