packages: quagga/quagga-zebra.init - made KEEP_KERNEL_ROUTES and RETAIN_ROU...

gotar gotar at pld-linux.org
Sun May 3 19:45:10 CEST 2009


Author: gotar                        Date: Sun May  3 17:45:10 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- made KEEP_KERNEL_ROUTES and RETAIN_ROUTES actually do something,
- full path to daemon invocation,
- fixed restart|force-reload return value

---- Files affected:
packages/quagga:
   quagga-zebra.init (1.7 -> 1.8) 

---- Diffs:

================================================================
Index: packages/quagga/quagga-zebra.init
diff -u packages/quagga/quagga-zebra.init:1.7 packages/quagga/quagga-zebra.init:1.8
--- packages/quagga/quagga-zebra.init:1.7	Thu Dec  8 02:02:49 2005
+++ packages/quagga/quagga-zebra.init	Sun May  3 19:45:05 2009
@@ -9,7 +9,6 @@
 # processname:	zebra
 # config:	/etc/zebra/zebra.conf
 
-
 # Source function library
 . /etc/rc.d/init.d/functions
 
@@ -35,11 +34,13 @@
   start)
 	# Check if the services are already running?
 	if [ ! -f /var/lock/subsys/zebra ]; then
-                FLAGS="--daemon"
-                [ -n "$VTY_ADDR" ] && FLAGS="$FLAGS --vty_addr $VTY_ADDR"
-                [ -n "$VTY_PORT" ] && FLAGS="$FLAGS --vty_port $VTY_PORT"
+		FLAGS="--daemon"
+		is_yes "$RETAIN_ROUTES" && FLAGS="$FLAGS --retain"
+		is_yes "$KEEP_KERNEL_ROUTES" && FLAGS="$FLAGS --keep_kernel"
+		[ -n "$VTY_ADDR" ] && FLAGS="$FLAGS --vty_addr $VTY_ADDR"
+		[ -n "$VTY_PORT" ] && FLAGS="$FLAGS --vty_port $VTY_PORT"
 		msg_starting zebra
-		daemon zebra $FLAGS
+		daemon /usr/sbin/zebra $FLAGS
 		RETVAL=$?
 		if [ $RETVAL -eq 0 ] ; then
 			touch /var/lock/subsys/zebra
@@ -54,7 +55,7 @@
   stop)
 	if [ -f /var/lock/subsys/zebra ]; then
 		# Stop daemons.
- 		msg_stopping "zebra"
+		msg_stopping "zebra"
 		killproc zebra
 		rm -f /var/lock/subsys/zebra
 	else
@@ -89,7 +90,7 @@
 			/etc/rc.d/init.d/ripngd "$1"
 		fi
 	fi
-	exit $?
+	exit $R
 	;;
   *)
 	msg_usage "$0 {start|stop|restart|force-reload|status}"
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/quagga/quagga-zebra.init?r1=1.7&r2=1.8&f=u



More information about the pld-cvs-commit mailing list