]> git.pld-linux.org Git - packages/bird.git/commitdiff
- separate init scripts for IPv4 and IPv6 bird
authorJacek Konieczny <jajcus@pld-linux.org>
Wed, 22 Sep 2004 12:24:33 +0000 (12:24 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    bird-ipv4.init -> 1.1
    bird-ipv6.init -> 1.1

bird-ipv4.init [new file with mode: 0644]
bird-ipv6.init [new file with mode: 0644]

diff --git a/bird-ipv4.init b/bird-ipv4.init
new file mode 100644 (file)
index 0000000..0582c72
--- /dev/null
@@ -0,0 +1,73 @@
+#!/bin/sh
+#
+# bird         Starts the Dynamic Route Daemon 
+#
+# chkconfig:   345 80 45
+#
+# description: Dynamic Route Daemon for IPv4 routers
+#
+# processname: bird-ipv4
+# 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-ipv4 ] && . /etc/sysconfig/bird-ipv4
+
+# 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-ipv4 ]; then
+               msg_starting "bird for IPv4"
+               daemon ${SERVICE_RUN_NICE_LEVEL} bird
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bird-ipv4
+       else
+               msg_already_running "bird for IPv4"
+       fi
+       ;;
+  stop)
+       # Stop daemons.
+       if [ -f /var/lock/subsys/bird-ipv4 ]; then
+               msg_stopping "bird for IPv4"
+               killproc bird
+               rm -f /var/lock/subsys/bird-ipv4
+       else
+               msg_not_running "bird for IPv4"
+       fi
+       ;;
+  status)
+       status bird-ipv4 bird
+       exit $?
+       ;;
+  restart|force-reload)
+       $0 stop
+       $0 start
+       exit $?
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       exit 3
+esac
+
+exit $RETVAL
diff --git a/bird-ipv6.init b/bird-ipv6.init
new file mode 100644 (file)
index 0000000..89b2676
--- /dev/null
@@ -0,0 +1,73 @@
+#!/bin/sh
+#
+# bird         Starts the Dynamic Route Daemon 
+#
+# chkconfig:   345 80 45
+#
+# description: Dynamic Route Daemon for IPv6 routers
+#
+# processname: bird-ipv6
+# 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} bird
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bird-ipv6
+       else
+               msg_already_running "bird for IPv6"
+       fi
+       ;;
+  stop)
+       # Stop daemons.
+       if [ -f /var/lock/subsys/bird-ipv6 ]; then
+               msg_stopping "bird for IPv6"
+               killproc bird
+               rm -f /var/lock/subsys/bird-ipv6
+       else
+               msg_not_running "bird for IPv6"
+       fi
+       ;;
+  status)
+       status bird-ipv6 bird
+       exit $?
+       ;;
+  restart|force-reload)
+       $0 stop
+       $0 start
+       exit $?
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       exit 3
+esac
+
+exit $RETVAL
This page took 0.098676 seconds and 4 git commands to generate.