Date: Sat, 14 May 2011 15:26:26 -0700 From: Doug Barton <dougb@FreeBSD.org> To: Greg Larkin <glarkin@FreeBSD.org> Cc: jnlin@csie.nctu.edu.tw, cvs-ports@FreeBSD.org, Erik Steigler <erik@okcupid.com>, cvs-all@FreeBSD.org, ports-committers@FreeBSD.org Subject: Re: cvs commit: ports/net/scribe Makefile ports/net/scribe/files scribe.in Message-ID: <4DCF0192.6030808@FreeBSD.org> In-Reply-To: <201105131353.p4DDrtms046413@repoman.freebsd.org> References: <201105131353.p4DDrtms046413@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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<erik@okcupid.com> [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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DCF0192.6030808>