#!/bin/sh # # bird Starts the Dynamic Route Daemon # # chkconfig: 345 11 90 # # description: Dynamic Route Daemon for IPv6 routers # # processname: bird-6 # config: /etc/bird.conf # Source function library . /etc/rc.d/init.d/functions # Get network config . /etc/sysconfig/network # Get service config [ -f /etc/sysconfig/bird-ipv6 ] && . /etc/sysconfig/bird-ipv6 # Check that networking is up. if is_yes "${NETWORKING}"; then if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then msg_network_down bird exit 1 fi else exit 0 fi # Sanity checks. [ -f /etc/bird.conf ] || exit 0 RETVAL=0 # See how we were called. case "$1" in start) # Check if the services are already running? if [ ! -f /var/lock/subsys/bird-ipv6 ]; then msg_starting "bird for IPv6" daemon ${SERVICE_RUN_NICE_LEVEL} /usr/sbin/bird-6 -u bird -g bird RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bird-ipv6 else msg_already_running "bird for IPv6" fi ;; stop) if [ -f /var/lock/subsys/bird-ipv6 ]; then msg_stopping "bird for IPv6" killproc bird-6 rm -f /var/lock/subsys/bird-ipv6 else msg_not_running "bird for IPv6" fi ;; reload|force-reload) if [ -f /var/lock/subsys/bird-ipv6 ]; then msg_reloading "bird for IPv6" killproc bird-6 -HUP RETVAL=$? else msg_not_running "bird for IPv6" RETVAL=7 fi ;; status) status bird-ipv6 bird-6 exit $? ;; restart|force-reload) $0 stop $0 start exit $? ;; *) msg_usage "$0 {start|stop|restart|reload|force-reload|status}" exit 3 esac exit $RETVAL