]> git.pld-linux.org Git - packages/bird.git/blob - bird-ipv6.init
- added missing BR: autoconf
[packages/bird.git] / bird-ipv6.init
1 #!/bin/sh
2 #
3 # bird          Starts the Dynamic Route Daemon 
4 #
5 # chkconfig:    345 80 45
6 #
7 # description:  Dynamic Route Daemon for IPv6 routers
8 #
9 # processname:  bird-ipv6
10 # config:       /etc/bird.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/bird-ipv6 ] && . /etc/sysconfig/bird-ipv6
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 bird
26                 exit 1
27         fi
28 else
29         exit 0
30 fi
31
32 # Sanity checks.
33 [ -f /etc/bird.conf ] || exit 0
34
35 RETVAL=0
36 # See how we were called.
37 case "$1" in
38   start)
39         # Check if the services are already running?
40         if [ ! -f /var/lock/subsys/bird-ipv6 ]; then
41                 msg_starting "bird for IPv6"
42                 daemon ${SERVICE_RUN_NICE_LEVEL} bird
43                 RETVAL=$?
44                 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bird-ipv6
45         else
46                 msg_already_running "bird for IPv6"
47         fi
48         ;;
49   stop)
50         # Stop daemons.
51         if [ -f /var/lock/subsys/bird-ipv6 ]; then
52                 msg_stopping "bird for IPv6"
53                 killproc bird
54                 rm -f /var/lock/subsys/bird-ipv6
55         else
56                 msg_not_running "bird for IPv6"
57         fi
58         ;;
59   status)
60         status bird-ipv6 bird
61         exit $?
62         ;;
63   restart|force-reload)
64         $0 stop
65         $0 start
66         exit $?
67         ;;
68   *)
69         msg_usage "$0 {start|stop|restart|force-reload|status}"
70         exit 3
71 esac
72
73 exit $RETVAL
This page took 0.035918 seconds and 3 git commands to generate.