From owner-cvs-all@FreeBSD.ORG Sat May 14 22:26:36 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 28BDD1065677; Sat, 14 May 2011 22:26:36 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 65-241-43-5.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 694501611BE; Sat, 14 May 2011 22:26:28 +0000 (UTC) Message-ID: <4DCF0192.6030808@FreeBSD.org> Date: Sat, 14 May 2011 15:26:26 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 MIME-Version: 1.0 To: Greg Larkin References: <201105131353.p4DDrtms046413@repoman.freebsd.org> In-Reply-To: <201105131353.p4DDrtms046413@repoman.freebsd.org> X-Enigmail-Version: 1.1.2 OpenPGP: id=1A1ABC84 Content-Type: multipart/mixed; boundary="------------040707090004030900070906" Cc: jnlin@csie.nctu.edu.tw, cvs-ports@FreeBSD.org, Erik Steigler , cvs-all@FreeBSD.org, ports-committers@FreeBSD.org Subject: Re: cvs commit: ports/net/scribe Makefile ports/net/scribe/files scribe.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, 14 May 2011 22:26:36 -0000 This is a multi-part message in MIME format. --------------040707090004030900070906 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Adding set_rcvar is the right solution for the problem described in the PR, but the other changes are going in the wrong direction. Any time you(pl.) feel compelled to re-write start_cmd it is almost universally the wrong answer. In the attached patch: 1. Miscellaneous whitespace fixes (style issue, non-critical) 2. Change REQUIRE to LOGIN which is what is typically done for local scripts. If there is some reason that it needs to be run earlier this can be omitted. 3. Add KEYWORD shutdown which should be present for scripts that start a persistent service so that they can be shutdown cleanly. 4. Use daemon as the command which is how this is sort of thing is typically done. 5. Remove the default-empty _flags assignment (neither necessary or desirable). 6. Put the right arguments into command_args to make command=daemon work properly. Please test these changes. Maintainer can you please respond in a timely manner? :) Thanks, Doug On 05/13/2011 06:53, Greg Larkin wrote: > glarkin 2011-05-13 13:53:55 UTC > > FreeBSD ports repository > > Modified files: > net/scribe Makefile > net/scribe/files scribe.in > Log: > - Fixed rc.d script so it adheres to rc.conf setting [1] > - Added missing dependency on devel/py-thrift > - Bumped PORTREVISION > > PR: ports/154942 (based on) http://www.FreeBSD.org/cgi/query-pr.cgi?pr=154942 > Submitted by: Erik Steigler [1] > Approved by: maintainer timeout (18 days) > > Revision Changes Path > 1.6 +4 -2 ports/net/scribe/Makefile > 1.2 +16 -3 ports/net/scribe/files/scribe.in > > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/net/scribe/Makefile.diff?&r1=1.5&r2=1.6&f=h > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/net/scribe/files/scribe.in.diff?&r1=1.1&r2=1.2&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/ --------------040707090004030900070906 Content-Type: text/plain; name="scribe.in.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="scribe.in.diff" Index: Makefile =================================================================== RCS file: /home/pcvs/ports/net/scribe/Makefile,v retrieving revision 1.6 diff -u -r1.6 Makefile --- Makefile 13 May 2011 13:53:55 -0000 1.6 +++ Makefile 14 May 2011 22:13:55 -0000 @@ -6,7 +6,7 @@ PORTNAME= scribe PORTVERSION= 2.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net MASTER_SITES= http://cloud.github.com/downloads/facebook/scribe/ Index: files/scribe.in =================================================================== RCS file: /home/pcvs/ports/net/scribe/files/scribe.in,v retrieving revision 1.2 diff -u -r1.2 scribe.in --- files/scribe.in 13 May 2011 13:53:55 -0000 1.2 +++ files/scribe.in 14 May 2011 22:13:55 -0000 @@ -1,33 +1,29 @@ #!/bin/sh -# + # $FreeBSD: ports/net/scribe/files/scribe.in,v 1.2 2011/05/13 13:53:55 glarkin Exp $ # - # PROVIDE: scribe -# REQUIRE: DAEMON +# REQUIRE: LOGIN +# KEYWORD: shutdown . /etc/rc.subr name="scribe" rcvar=`set_rcvar` + pidfile="/var/run/${name}.pid" -command="%%PREFIX%%/bin/scribed" +command="/usr/sbin/daemon" -start_cmd=scribe_start stop_postcmd=scribe_cleanup +scribe_cleanup() { + [ -f "$pidfile" ] && /bin/unlink $pidfile +} + load_rc_config "$name" -: ${scribe_enable="NO"} -: ${scribe_flags=""} -scribe_start() -{ - echo "Starting ${name}." - /usr/sbin/daemon -cf -p ${pidfile} ${command} ${scribe_flags} -} +: ${scribe_enable="NO"} -scribe_cleanup() { - [ -f ${pidfile} ] && %%RM%% ${pidfile} -} +command_args="-cf -p $pidfile %%PREFIX%%/bin/scribed $scribe_flags" run_rc_command "$1" --------------040707090004030900070906--