[packages/quagga] - BABEL wireless mesh routing

paszczus paszczus at pld-linux.org
Sat May 3 17:07:23 CEST 2014


commit 015c4387225243c69b3a26f77a8586d2ad024c33
Author: Sławomir Paszkiewicz <paszczus at pld-linux.org>
Date:   Sat May 3 17:06:55 2014 +0200

    - BABEL wireless mesh routing

 quagga-babeld.init       | 75 ++++++++++++++++++++++++++++++++++++++++++++++++
 quagga-babeld.init~      | 75 ++++++++++++++++++++++++++++++++++++++++++++++++
 quagga-babeld.logrotate  |  9 ++++++
 quagga-babeld.logrotate~ |  9 ++++++
 quagga-babeld.sysconfig  | 18 ++++++++++++
 quagga-babeld.sysconfig~ | 18 ++++++++++++
 6 files changed, 204 insertions(+)
---
diff --git a/quagga-babeld.init b/quagga-babeld.init
new file mode 100644
index 0000000..2986ecb
--- /dev/null
+++ b/quagga-babeld.init
@@ -0,0 +1,75 @@
+#!/bin/sh
+#
+# babeld		Starts the Dynamic Route Daemon
+#
+# chkconfig:	345 15 84
+#
+# description:	Dynamic Route Daemon for IPv4 and IPv6 routers
+#
+# processname:	babeld
+# config:	/etc/zebra/babeld.conf
+
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Get service config
+[ -f /etc/sysconfig/babeld ] && . /etc/sysconfig/babeld
+
+# 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 babeld
+		exit 1
+	fi
+else
+	exit 0
+fi
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+	# Check if the services are already running?
+	if [ ! -f /var/lock/subsys/babeld ]; then
+		FLAGS="--daemon"
+		is_yes "$RETAIN_ROUTES" && FLAGS="$FLAGS --retain"
+		is_yes "$NO_KERNEL" && FLAGS="$FLAGS --no_kernel"
+                [ -n "$VTY_ADDR" ] && FLAGS="$FLAGS --vty_addr $VTY_ADDR"
+                [ -n "$VTY_PORT" ] && FLAGS="$FLAGS --vty_port $VTY_PORT"
+		msg_starting babeld
+		daemon babeld $FLAGS
+		RETVAL=$?
+		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/babeld
+	else
+		msg_already_running "babeld"
+	fi
+	;;
+  stop)
+	if [ -f /var/lock/subsys/babeld ]; then
+		# Stop daemons.
+ 		msg_stopping "babeld"
+		killproc babeld
+		rm -f /var/lock/subsys/babeld
+	else
+		msg_not_running babeld
+	fi
+	;;
+  status)
+	status babeld
+	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/quagga-babeld.init~ b/quagga-babeld.init~
new file mode 100644
index 0000000..2b7ec1b
--- /dev/null
+++ b/quagga-babeld.init~
@@ -0,0 +1,75 @@
+#!/bin/sh
+#
+# bgpd		Starts the Dynamic Route Daemon
+#
+# chkconfig:	345 15 84
+#
+# description:	Dynamic Route Daemon for IPv4 and IPv6 routers
+#
+# processname:	bgpd
+# config:	/etc/zebra/bgpd.conf
+
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Get service config
+[ -f /etc/sysconfig/bgpd ] && . /etc/sysconfig/bgpd
+
+# 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 bgpd
+		exit 1
+	fi
+else
+	exit 0
+fi
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+	# Check if the services are already running?
+	if [ ! -f /var/lock/subsys/bgpd ]; then
+		FLAGS="--daemon"
+		is_yes "$RETAIN_ROUTES" && FLAGS="$FLAGS --retain"
+		is_yes "$NO_KERNEL" && FLAGS="$FLAGS --no_kernel"
+                [ -n "$VTY_ADDR" ] && FLAGS="$FLAGS --vty_addr $VTY_ADDR"
+                [ -n "$VTY_PORT" ] && FLAGS="$FLAGS --vty_port $VTY_PORT"
+		msg_starting bgpd
+		daemon bgpd $FLAGS
+		RETVAL=$?
+		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/bgpd
+	else
+		msg_already_running "bgpd"
+	fi
+	;;
+  stop)
+	if [ -f /var/lock/subsys/bgpd ]; then
+		# Stop daemons.
+ 		msg_stopping "bgpd"
+		killproc bgpd
+		rm -f /var/lock/subsys/bgpd
+	else
+		msg_not_running bgpd
+	fi
+	;;
+  status)
+	status bgpd
+	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/quagga-babeld.logrotate b/quagga-babeld.logrotate
new file mode 100644
index 0000000..16a0438
--- /dev/null
+++ b/quagga-babeld.logrotate
@@ -0,0 +1,9 @@
+/var/log/quagga/babeld.log {
+	su quagga quagga
+	missingok
+	olddir /var/log/archive/quagga
+	create 640 quagga quagga
+	postrotate
+		/bin/killall -USR1 babeld >/dev/null 2>&1
+	endscript
+}
diff --git a/quagga-babeld.logrotate~ b/quagga-babeld.logrotate~
new file mode 100644
index 0000000..650afcc
--- /dev/null
+++ b/quagga-babeld.logrotate~
@@ -0,0 +1,9 @@
+/var/log/quagga/bgpd.log {
+	su quagga quagga
+	missingok
+	olddir /var/log/archive/quagga
+	create 640 quagga quagga
+	postrotate
+		/bin/killall -USR1 bgpd >/dev/null 2>&1
+	endscript
+}
diff --git a/quagga-babeld.sysconfig b/quagga-babeld.sysconfig
new file mode 100644
index 0000000..700a67f
--- /dev/null
+++ b/quagga-babeld.sysconfig
@@ -0,0 +1,18 @@
+# Customized setings for zebra babeld
+
+# Nice level for routing daemon [-10 - +10]
+SERVICE_RUN_NICE_LEVEL="+2"
+
+# When program terminates, retain added route by zebra.
+#RETAIN_ROUTES=yes
+
+# Do not install route to kernel.
+#NO_KERNEL=yes
+
+# The address that the babeld VTY will listen on.
+# Default is all intrefaces.
+#VTY_ADDR=127.0.0.1
+
+# The port that the babeld VTY will listen on.
+# Default is 2605.
+#VTY_PORT=2605
diff --git a/quagga-babeld.sysconfig~ b/quagga-babeld.sysconfig~
new file mode 100644
index 0000000..4cf193d
--- /dev/null
+++ b/quagga-babeld.sysconfig~
@@ -0,0 +1,18 @@
+# Customized setings for zebra bgpd
+
+# Nice level for routing daemon [-10 - +10]
+SERVICE_RUN_NICE_LEVEL="+2"
+
+# When program terminates, retain added route by zebra.
+#RETAIN_ROUTES=yes
+
+# Do not install route to kernel.
+#NO_KERNEL=yes
+
+# The address that the bgpd VTY will listen on.
+# Default is all intrefaces.
+#VTY_ADDR=127.0.0.1
+
+# The port that the bgpd VTY will listen on.
+# Default is 2605.
+#VTY_PORT=2605
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/quagga.git/commitdiff/015c4387225243c69b3a26f77a8586d2ad024c33



More information about the pld-cvs-commit mailing list