From owner-cvs-all@FreeBSD.ORG Mon Oct 26 04:45:50 2009 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 485C81065679 for ; Mon, 26 Oct 2009 04:45:50 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id E45418FC16 for ; Mon, 26 Oct 2009 04:45:49 +0000 (UTC) Received: (qmail 4589 invoked by uid 399); 26 Oct 2009 04:45:48 -0000 Received: from localhost (HELO ?192.168.0.110?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 26 Oct 2009 04:45:48 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4AE5297D.1090809@FreeBSD.org> Date: Sun, 25 Oct 2009 21:45:49 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: "Vanilla I. Shu" References: <200910210955.n9L9tFFL004865@repoman.freebsd.org> In-Reply-To: <200910210955.n9L9tFFL004865@repoman.freebsd.org> X-Enigmail-Version: 0.96.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: cvs-ports@FreeBSD.org, ivoras@gmail.com, cvs-all@FreeBSD.org, ports-committers@FreeBSD.org Subject: Re: cvs commit: ports/databases/couchdb/files couchdb.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: Mon, 26 Oct 2009 04:45:50 -0000 Vanilla I. Shu wrote: > vanilla 2009-10-21 09:55:15 UTC > > FreeBSD ports repository > > Modified files: > databases/couchdb/files couchdb.in > Log: > Fix rc.d startup script syntax error. > > PR: ports/139658 http://www.FreeBSD.org/cgi/query-pr.cgi?pr=139658 > Submitted by: ivan voras > Approved by: maintainer > > Revision Changes Path > 1.2 +1 -1 ports/databases/couchdb/files/couchdb.in > > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/databases/couchdb/files/couchdb.in.diff?&r1=1.1&r2=1.2&f=h The fix in this diff only works accidentally, you really want to use -gt here (not just gt as was in the file before the patch). Check out test(1) for more information. There are also a few other issues: 1. respawn="" isn't needed, and we try to avoid setting empty variables. 2. it's a minor style issue, but if [ blah ]; then is generally preferred to if [ blah ]then. 3. load_rc_config should move down to right above the default settings for _enable and _flags, and all of the default variables should have a consistent style. 4. {start|stop}_precmd should move up to right after etcdir 5. pid_touch() should move up before load_rc_config 6. If the tests for _respawn and _enablelogs only have to run at start time they should be part of start_precmd. 7. You have different declarations for etcdir and couchdb_etcdir seems to be unused. Is this something the user is likely to need to override, or can it just be defined in the script? 8. In functions you should use tabs instead of 4 spaces. 9. You shouldn't check for an explicit "YES" (as in the _enablelogs test) you should always use checkyesno. I'm also wondering if all of those flags can really be overridden by the user or if command_args might not be more appropriate for all/some of them. Rather than making a patch (which I think would be too confusing) I've placed a copy of the file with these suggested changes at http://people.freebsd.org/~dougb/couchdb.in. This is untested, but I'm pretty sure it'll work. hth, Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/