cvs commit: ports/net Makefile ports/net/quagga-re Makefile distinfo pkg-descr pkg-install pkg-plist ports/net/quagga-re/files patch-ospfd__ospf_packet.c quagga.sh.in watchquagga.sh.in

Doug Barton dougb at FreeBSD.org
Sat Nov 26 04:24:07 UTC 2011


On 11/25/2011 06:09, Sergey Matveychuk wrote:
> sem         2011-11-25 14:09:12 UTC
> 
>   FreeBSD ports repository
> 
>   Modified files:
>     net                  Makefile 
>   Added files:
>     net/quagga-re        Makefile distinfo pkg-descr pkg-install 
>                          pkg-plist 
>     net/quagga-re/files  patch-ospfd__ospf_packet.c quagga.sh.in 
>                          watchquagga.sh.in 

To start with, it's been years since we've allowed new ports rc.d
scripts with the .sh suffix. That has to be fixed.

The attached patch adds the following:

1. Persistent services should have KEYWORD: shutdown
2. Various whitespace fixes
3. The defaults should be set after rcvar=
4. A couple of /bin/sh style fixes


hth,

Doug

-- 

		"We could put the whole Internet into a book."
		"Too practical."

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/

-------------- next part --------------
Index: quagga.sh.in
===================================================================
RCS file: /home/pcvs/ports/net/quagga-re/files/quagga.sh.in,v
retrieving revision 1.1
diff -u -r1.1 quagga.sh.in
--- quagga.sh.in	25 Nov 2011 14:09:12 -0000	1.1
+++ quagga.sh.in	26 Nov 2011 04:19:22 -0000
@@ -4,11 +4,10 @@
 #
 # PROVIDE: quagga
 # REQUIRE: netif routing 
-# KEYWORD: nojail
-
+# KEYWORD: nojail shutdown
 #
 # Add the following line to /etc/rc.conf to enable quagga:
-#quagga_enable="YES"
+#  quagga_enable="YES"
 #
 # You may also wish to use the following variables to fine-tune startup:
 #  quagga_flags="-d"
@@ -22,14 +21,21 @@
 #
 # If the quagga daemons require additional shared libraries to start,
 # use the following variable to run ldconfig(8) in advance:
-#quagga_extralibs_path="/usr/local/lib ..."
-#
+#  quagga_extralibs_path="/usr/local/lib ..."
 
 . /etc/rc.subr
 
 name="quagga"
 rcvar=`set_rcvar`
 
+# set defaults
+
+load_rc_config $name
+
+: ${quagga_enable="NO"}
+: ${quagga_flags="-d"}
+: ${quagga_daemons="zebra ripd ripngd ospfd ospf6d bgpd isisd"}
+
 start_postcmd=start_postcmd
 stop_postcmd=stop_postcmd
 
@@ -39,9 +45,9 @@
 	if [ "${quagga_daemons}" = "${quagga_daemons% ${name}}" ]; then
 		return;
 	fi
-        if [ ${quagga_wait_for} ]; then
+        if [ -n "${quagga_wait_for}" ]; then
 		echo Waiting for ${quagga_wait_for} route...
-		while true; do
+		while : ; do
 			/sbin/route -n get ${quagga_wait_for} >/dev/null 2>&1 && break;
 			sleep 1;
 		done
@@ -75,14 +81,6 @@
 	return ${ret}
 }
 
-# set defaults
-
-load_rc_config $name
-
-: ${quagga_enable="NO"}
-: ${quagga_flags="-d"}
-: ${quagga_daemons="zebra ripd ripngd ospfd ospf6d bgpd isisd"}
-
 quagga_cmd=$1
 
 case "$1" in


More information about the cvs-ports mailing list