Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Apr 2011 09:51:09 -0700
From:      Doug Barton <dougb@FreeBSD.org>
To:        Baptiste Daroussin <bapt@FreeBSD.org>
Cc:        cvs-ports@FreeBSD.org, bapabooiee@gmail.com, perl@FreeBSD.org, cvs-all@FreeBSD.org, ports-committers@FreeBSD.org
Subject:   Re: cvs commit: ports/www/perlbal Makefile ports/www/perlbal/files perlbal.in
Message-ID:  <4DB3037D.6080607@FreeBSD.org>
In-Reply-To: <201104230732.p3N7Wt7R065417@repoman.freebsd.org>
References:  <201104230732.p3N7Wt7R065417@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------030904040801010605050704
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

[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/


--------------030904040801010605050704
Content-Type: text/plain;
 name="perlbal-rcd.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="perlbal-rcd.diff"

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"

--------------030904040801010605050704--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DB3037D.6080607>