Search
j0ke.net Open Build Service
>
Projects
>
server:routing
>
bird
> bird.init
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File bird.init of Package bird
#! /bin/sh # # bird Starts the Internet Routing Daemon. # # Author: Ondrej Feela Filip, <feela@network.cz> # # chkconfig: - 32 75 # description: Internet routing daemon supporting IPv4 routing protocols: # BGP4, RIPv2 and OSPFv2. # # processname: bird # config: /etc/bird.conf ### BEGIN INIT INFO # Provides: bird # Required-Start: $network $remote_fs # Required-Stop: $network $remote_fs # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Description: Starts bird ### END INIT INFO # Source function library. . /etc/rc.d/init.d/functions [ -f /etc/sysconfig/network ] || exit 0 . /etc/sysconfig/network BIRD4="yes" BIRD6="yes" [ -f /etc/bird.conf ] || BIRD4="no" [ -f /usr/sbin/bird ] || BIRD4="no" [ "${NETWORKING}" = "yes" ] || BIRD4="no" [ -f /etc/bird-6.conf ] || BIRD6="no" [ -f /usr/sbin/bird6 ] || BIRD6="no" [ "${NETWORKING_IPV6}" = "yes" ] || BIRD6="no" RETVAL=0 # See how we were called. case "$1" in start) if [ "$BIRD4" = "yes" ] then echo -n "Starting BIRD for IPv4: " daemon bird RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bird fi if [ "$BIRD6" = "yes" ] then echo -n "Starting BIRD for IPv6: " daemon bird6 RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bird6 fi ;; stop) echo -n "Stopping BIRD for IPv4: " killproc bird RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/bird echo -n "Stopping BIRD for IPv6: " killproc bird6 RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/bird6 ;; status) status bird status bird6 RETVAL=$? ;; restart) $0 stop $0 start RETVAL=$? ;; reload) killall -HUP bird killall -HUP bird6 RETVAL=$? ;; *) echo "Usage: bird.init {start|stop|status|restart|reload}" exit 1 esac exit $REVAL