cvs commit: ports/databases/couchdb/files couchdb.in

Doug Barton dougb at FreeBSD.org
Mon Oct 26 04:45:50 UTC 2009


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 <ivoras.at.gmail.com>
>   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 ]<CR>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/


More information about the cvs-ports mailing list