From owner-cvs-ports@FreeBSD.ORG Sun Jul 31 08:21:34 2011 Return-Path: Delivered-To: cvs-ports@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 6A58C106566B; Sun, 31 Jul 2011 08:21:34 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 65-241-43-4.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 1B70214E562; Sun, 31 Jul 2011 08:21:34 +0000 (UTC) Message-ID: <4E35108D.1040907@FreeBSD.org> Date: Sun, 31 Jul 2011 01:21:33 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:5.0) Gecko/20110723 Thunderbird/5.0 MIME-Version: 1.0 To: C++ RTMP Server Support References: <201107301549.p6UFn7rK070976@repoman.freebsd.org> <4E3495B0.3070405@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.2pre OpenPGP: id=1A1ABC84 Content-Type: multipart/mixed; boundary="------------060502030805050904000805" Cc: Jin-Sih Lin , cvs-ports@FreeBSD.org, Li-Wen Hsu , cvs-all@FreeBSD.org, ports-committers@FreeBSD.org Subject: Re: cvs commit: ports/net/crtmpserver Makefile distinfo pkg-plist ports/net/crtmpserver/files crtmpserver.in X-BeenThere: cvs-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2011 08:21:34 -0000 This is a multi-part message in MIME format. --------------060502030805050904000805 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit You completely misunderstood what I wrote. Please review the attached patch, which corrects the pidfile problem, and also simplifies required_files. Doug On 07/31/2011 00:21, C++ RTMP Server Support wrote: > But I set it up. I pick it up from rc.conf settings or default it to "/var/run/${name}.pid". > The big difference is that now the pid file is generated by crtmpserver (the binary). Now it has --pid parameter. Before, it was generated by the script. > If you feel that we should keep the old approach (generate the pid from the script, not from the binary), is totally fine with me > > Best regards, > Andrei > > On Jul 31, 2011, at 2:37 AM, Doug Barton wrote: > >> Is there a reason you're not setting pidfile anymore? While on one hand >> I think allowing users to specify ${name}_pidfile is usually overkill, >> the pidfile variable is special in rc.subr. If you're going to allow the >> user to specify the pidfile location the usual way to do that is: >> >> pidfile="${foo_pidfile:-/var/run/foo.pid}" >> >> (at some point after load_rc_config). Then use $pidfile throughout the >> rest of the script. >> >> >> Doug >> >> >> On 07/30/2011 08:49, Li-Wen Hsu wrote: >>> lwhsu 2011-07-30 15:49:07 UTC >>> >>> FreeBSD ports repository >>> >>> Modified files: >>> net/crtmpserver Makefile distinfo pkg-plist >>> net/crtmpserver/files crtmpserver.in >>> Log: >>> - Update to 0.545 >>> >>> PR: ports/158886 http://www.FreeBSD.org/cgi/query-pr.cgi?pr=158886 >>> Submitted by: Jin-Sih Lin >>> Approved by: C++ RTMP Server Support (Andrei) (maintainer) >>> >>> Revision Changes Path >>> 1.4 +10 -11 ports/net/crtmpserver/Makefile >>> 1.2 +2 -2 ports/net/crtmpserver/distinfo >>> 1.3 +7 -13 ports/net/crtmpserver/files/crtmpserver.in >>> 1.2 +2 -21 ports/net/crtmpserver/pkg-plist >>> >>> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/net/crtmpserver/Makefile.diff?&r1=1.3&r2=1.4&f=h >>> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/net/crtmpserver/distinfo.diff?&r1=1.1&r2=1.2&f=h >>> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/net/crtmpserver/files/crtmpserver.in.diff?&r1=1.2&r2=1.3&f=h >>> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/net/crtmpserver/pkg-plist.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/ --------------060502030805050904000805 Content-Type: text/plain; name="crtmpserver.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="crtmpserver.diff" Index: Makefile =================================================================== RCS file: /home/pcvs/ports/net/crtmpserver/Makefile,v retrieving revision 1.4 diff -u -r1.4 Makefile --- Makefile 30 Jul 2011 15:49:06 -0000 1.4 +++ Makefile 31 Jul 2011 08:19:43 -0000 @@ -7,6 +7,7 @@ PORTNAME= crtmpserver PORTVERSION= 0.545 +PORTVERSION= 1 CATEGORIES= net MASTER_SITES= http://rtmpd.com/assets/sources/ Index: files/crtmpserver.in =================================================================== RCS file: /home/pcvs/ports/net/crtmpserver/files/crtmpserver.in,v retrieving revision 1.3 diff -u -r1.3 crtmpserver.in --- files/crtmpserver.in 30 Jul 2011 15:49:07 -0000 1.3 +++ files/crtmpserver.in 31 Jul 2011 08:19:43 -0000 @@ -21,19 +21,17 @@ name="crtmpserver" rcvar=${name}_enable -command=%%PREFIX%%/sbin/${name} - load_rc_config $name : ${crtmpserver_enable="NO"} -: ${crtmpserver_config="%%PREFIX%%/etc/crtmpserver.lua"} : ${crtmpserver_username="crtmpserver"} : ${crtmpserver_groupname="crtmpserver"} -: ${crtmpserver_pidfile="/var/run/${name}.pid"} -required_files="$crtmpserver_config" +pidfile="${crtmpserver_pidfile="/var/run/${name}.pid"}" +required_files="${crtmpserver_config="%%PREFIX%%/etc/crtmpserver.lua"}" -command_args="--daemon --uid=`id -u ${crtmpserver_username}` --gid=`pw groupshow ${crtmpserver_groupname} | awk -F ":" '{print $3}'` --pid=${crtmpserver_pidfile} $required_files" +command=%%PREFIX%%/sbin/${name} -run_rc_command "$1" +command_args="--daemon --uid=`id -u ${crtmpserver_username}` --gid=`pw groupshow ${crtmpserver_groupname} | awk -F ":" '{print $3}'` --pid=$pidfile $required_files" +run_rc_command "$1" --------------060502030805050904000805--