From owner-cvs-all@FreeBSD.ORG Sat Nov 26 04:24:06 2011 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id C5509106566B; Sat, 26 Nov 2011 04:24:06 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 2921E14D96D; Sat, 26 Nov 2011 04:24:05 +0000 (UTC) Message-ID: <4ED069E4.6030408@FreeBSD.org> Date: Fri, 25 Nov 2011 20:24:04 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111110 Thunderbird/8.0 MIME-Version: 1.0 To: Sergey Matveychuk References: <201111251409.pAPE9CwK090102@repoman.freebsd.org> In-Reply-To: <201111251409.pAPE9CwK090102@repoman.freebsd.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: multipart/mixed; boundary="------------040003090504080206030807" Cc: cvs-ports@FreeBSD.org, cvs-all@FreeBSD.org, ports-committers@FreeBSD.org Subject: Re: 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 X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2011 04:24:07 -0000 This is a multi-part message in MIME format. --------------040003090504080206030807 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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/ --------------040003090504080206030807 Content-Type: text/plain; name="quagga.sh.in.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="quagga.sh.in.diff" 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 --------------040003090504080206030807--