3 # bgpd Starts the Dynamic Route Daemon
7 # description: Dynamic Route Daemon for IPv4 and IPv6 routers
10 # config: /etc/zebra/bgpd.conf
13 # Source function library
14 . /etc/rc.d/init.d/functions
17 . /etc/sysconfig/network
20 [ -f /etc/sysconfig/bgpd ] && . /etc/sysconfig/bgpd
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
33 # See how we were called.
36 # Check if the services are already running?
37 if [ ! -f /var/lock/subsys/bgpd ]; then
39 is_yes "$RETAIN_ROUTES" && FLAGS="$FLAGS --retain"
40 is_yes "$NO_KERNEL" && FLAGS="$FLAGS --no_kernel"
41 [ -n "$VTY_ADDR" ] && FLAGS="$FLAGS --vty_addr $VTY_ADDR"
42 [ -n "$VTY_PORT" ] && FLAGS="$FLAGS --vty_port $VTY_PORT"
46 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bgpd
48 msg_already_running "bgpd"
52 if [ -f /var/lock/subsys/bgpd ]; then
56 rm -f /var/lock/subsys/bgpd
71 msg_usage "$0 {start|stop|restart|force-reload|status}"