cvs commit: ports/www/perlbal Makefile ports/www/perlbal/files perlbal.in

Doug Barton dougb at FreeBSD.org
Sat Apr 23 16:51:11 UTC 2011


[Meta-note, please don't obfuscate e-mail addresses in commit logs. It 
makes no difference to the spammers since there is no human-readable 
obfuscation that they can't parse out already, and it makes it more 
difficult to copy and paste e-mail addresses, as well as to search for 
contributions made by individuals who are not committers.]

The rc.d script looks good overall. I've attached a patch to make a 
couple of small changes. For future reference, _configuration is usually 
spelled _conf by convention, although there is nothing special about 
that variable, so no point in changing it now.

Since you allow the user to specify the configuration file location, and 
I am assuming that the configuration file is mandatory, I'm suggesting 
the changes in the patch (adding it to required_files, and using 
command_args instead of _flags). At minimum the argument to daemonize 
the service should always be in command_args, and is traditionally 
listed last. And first but not least, unless there is a reason to run it 
earlier we prefer local scripts to REQUIRE: LOGIN.

If someone decides to commit these changes, please don't forget the 
PORTREVISION bump. :)


hth,

Doug


On 04/23/2011 00:32, Baptiste Daroussin wrote:
> bapt        2011-04-23 07:32:55 UTC
>
>    FreeBSD ports repository
>
>    Modified files:
>      www/perlbal          Makefile
>      www/perlbal/files    perlbal.in
>    Log:
>    - fix rc script: use --config instead of -f and --daemon instead of&  [1]
>    while here:
>    - move configuration to perlbal subdirectory (as upstream recommands)
>    - s,/etc/perlbal,${PREFIX}/etc/perlbal,g in doc and code for consistency
>    - add a new dependency on p5-IO-AIO
>
>    PR:             ports/156559  http://www.FreeBSD.org/cgi/query-pr.cgi?pr=156559
>    Submitted by:   Dean Matzkov<bapabooiee _at_ gmail.com>
>
>    Revision  Changes    Path
>    1.24      +16 -5     ports/www/perlbal/Makefile
>    1.3       +4 -2      ports/www/perlbal/files/perlbal.in
>
> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/www/perlbal/Makefile.diff?&r1=1.23&r2=1.24&f=h
> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/www/perlbal/files/perlbal.in.diff?&r1=1.2&r2=1.3&f=h
>



-- 

	Nothin' ever doesn't change, but nothin' changes much.
			-- OK Go

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

-------------- next part --------------
Index: perlbal.in
===================================================================
RCS file: /home/pcvs/ports/www/perlbal/files/perlbal.in,v
retrieving revision 1.3
diff -u -r1.3 perlbal.in
--- perlbal.in	23 Apr 2011 07:32:55 -0000	1.3
+++ perlbal.in	23 Apr 2011 16:41:58 -0000
@@ -1,10 +1,9 @@
 #!/bin/sh
-#
+
 # $FreeBSD: ports/www/perlbal/files/perlbal.in,v 1.3 2011/04/23 07:32:55 bapt Exp $
 #
-
 # PROVIDE: perlbal
-# REQUIRE: DAEMON
+# REQUIRE: LOGIN
 # KEYWORK: shutdown
 
 . /etc/rc.subr
@@ -13,9 +12,12 @@
 command="%%PREFIX%%/bin/perlbal"
 
 load_rc_config "$name"
+
 : ${perlbal_enable="NO"}
 : ${perlbal_configuration="%%PREFIX%%/etc/perlbal/perlbal.conf"}
-: ${perlbal_flags="--config $perlbal_configuration --daemon"}
 
-run_rc_command "$1"
+required_files="$perlbal_configuration"
+
+command_args="--config $required_files --daemon"
 
+run_rc_command "$1"


More information about the cvs-all mailing list