From owner-freebsd-rc@FreeBSD.ORG Tue Mar 27 18:10:59 2012 Return-Path: Delivered-To: rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A5FBB106566B; Tue, 27 Mar 2012 18:10:59 +0000 (UTC) (envelope-from 5u623l20@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 343238FC08; Tue, 27 Mar 2012 18:10:59 +0000 (UTC) Received: by vcmm1 with SMTP id m1so208511vcm.13 for ; Tue, 27 Mar 2012 11:10:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=X/lgrleohDPRC9+cwhbT9Yqx6kEfox7STuwbrb1owag=; b=rHWauhxUkLZtV6rlYKj0zzzONRUZ+v+oD6NV8pDWhY4S2gIQ+SqEhfsgSxh10BHnW0 9YVakP1G15TFrr1e5um7QekKjahKfeR3rF0aGsvHT5PiwrYr6FCt84Xu54b4GgBAFAD9 OeTbNm86BuzVaKBT8A8SID4RPzO9oO/hjyNDfsCIMWFz74j0QvqJEGfr19kHjB4ZGRWK jIBhSIBeCY0zbRLmyUAzsunXU538VBNNQU8pTFo3XnSfGz5yGyTMOqaJTIhr3OsyDNCm qRG1jXLezvWuCEAqsLmvzgNDKU9XtSlYwa9aztqnJzwAT0vCBAqR9F9Si3WzZnFhEaPc ZRtQ== MIME-Version: 1.0 Received: by 10.52.38.167 with SMTP id h7mr10411728vdk.109.1332871858662; Tue, 27 Mar 2012 11:10:58 -0700 (PDT) Received: by 10.220.181.9 with HTTP; Tue, 27 Mar 2012 11:10:58 -0700 (PDT) In-Reply-To: <1332869146.439481.86668.nullmailer@experts-exchange.com> References: <1332869146.439481.86668.nullmailer@experts-exchange.com> Date: Wed, 28 Mar 2012 00:10:58 +0600 Message-ID: From: Muhammad Moinur Rahman <5u623l20@gmail.com> To: Jason Helfman Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: rc@freebsd.org, FreeBSD-gnats-submit@freebsd.org Subject: Re: [PATCH] www/resin3: reorganize rc script X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2012 18:10:59 -0000 Hi Jason, Good to see you again. :D As far as I remember we got rid off the users problem running the application with www user and group. In that case don't you think we can get rid off the following variables from the rc file : +%%APP_NAME%%_user=${%%APP_NAME%%_user:-"%%USERS%%"} +%%APP_NAME%%_group=${%%APP_NAME%%_group:-"%%GROUPS%%"} Let me know your opinion please. Regards, Muhammad On Tue, Mar 27, 2012 at 11:25 PM, Jason Helfman wrote: > > >Submitter-Id: current-users > >Originator: Jason Helfman > >Organization: > >Confidential: no > >Synopsis: [PATCH] www/resin3: reorganize rc script > >Severity: non-critical > >Priority: low > >Category: ports > >Class: change-request > >Release: FreeBSD 8.2-RELEASE amd64 > >Environment: > System: FreeBSD dormouse.experts-exchange.com 8.2-RELEASE FreeBSD > 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011 > >Description: > Modifications were requested to the resin rc script from dougb@ > I am putting this pr in for approval and review > > Added file(s): > - files/resin3.in > > Removed file(s): > - files/resin3.sh.in > > Port maintainer (5u623l20@gmail.com) is cc'd. > > Generated with FreeBSD Port Tools 0.99_5 (mode: change, diff: CVS) > >How-To-Repeat: > >Fix: > > --- resin-3.1.12_1.patch begins here --- > Index: Makefile > =================================================================== > RCS file: /home/pcvs/ports/www/resin3/Makefile,v > retrieving revision 1.46 > diff -u -r1.46 Makefile > --- Makefile 14 Mar 2012 18:09:37 -0000 1.46 > +++ Makefile 27 Mar 2012 17:24:38 -0000 > @@ -7,6 +7,7 @@ > > PORTNAME= resin > PORTVERSION= 3.1.12 > +PORTREVISION= 1 > CATEGORIES= www java > MASTER_SITES= http://www.caucho.com/download/ > > @@ -44,7 +45,7 @@ > # Other settings > APXS?= ${LOCALBASE}/sbin/apxs > SUB_FILES= pkg-message resin3ctl > -USE_RC_SUBR= resin3.sh > +USE_RC_SUBR= resin3 > > .include > > Index: files/resin3.in > =================================================================== > RCS file: files/resin3.in > diff -N files/resin3.in > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ files/resin3.in 27 Mar 2012 17:24:38 -0000 > @@ -0,0 +1,43 @@ > +#!/bin/sh > +# > +# $FreeBSD: ports/www/resin3/files/resin3.sh.in,v 1.1 2012/03/13 > 16:29:23 jgh Exp $ > +# > + > +# PROVIDE: %%APP_NAME%% > +# REQUIRE: LOGIN NETWORKING SERVERS > +# BEFORE: DAEMON > +# KEYWORD: shutdown > + > +# > +# Add the following line to /etc/rc.conf to enable %%APP_NAME%%: > +# > +# %%APP_NAME%%_enable="YES" > +# > + > + > +%%APP_NAME%%_enable=${%%APP_NAME%%_enable:-"NO"} > +%%APP_NAME%%_user=${%%APP_NAME%%_user:-"%%USERS%%"} > +%%APP_NAME%%_group=${%%APP_NAME%%_group:-"%%GROUPS%%"} > + > +. /etc/rc.subr > + > +name=%%APP_NAME%% > +rcvar=%%APP_NAME%%_enable > + > +load_rc_config ${name} > + > +command="%%PREFIX%%/sbin/%%APP_NAME%%ctl" > +command_args="start" > +pidfile=%%PID_FILE%% > + > +if test -n "${%%APP_NAME%%_java_version}" ; then > + JAVA_HOME=$(JAVA_VERSION="${%%APP_NAME%%_java_version}" > JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVA_HOME | cut -d= -f2) > + procname=$(JAVA_VERSION="${%%APP_NAME%%_java_version}" > JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVAVM_PROG | cut -d= -f2) > +else > + JAVA_HOME=$(JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVA_HOME | > cut -d= -f2) > + procname=$(JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVAVM_PROG > | cut -d= -f2) > +fi > + > +export JAVA_HOME > + > +run_rc_command "$1" > Index: files/resin3.sh.in > =================================================================== > RCS file: files/resin3.sh.in > diff -N files/resin3.sh.in > --- files/resin3.sh.in 13 Mar 2012 16:29:23 -0000 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,43 +0,0 @@ > -#!/bin/sh > -# > -# $FreeBSD: ports/www/resin3/files/resin3.sh.in,v 1.1 2012/03/13 > 16:29:23 jgh Exp $ > -# > - > -# PROVIDE: %%APP_NAME%% > -# REQUIRE: LOGIN > -# KEYWORD: shutdown > - > -# > -# Add the following line to /etc/rc.conf to enable %%APP_NAME%%: > -# > -# %%APP_NAME%%_enable="YES" > -# > - > -. /etc/rc.subr > - > -name=%%APP_NAME%% > -rcvar=%%APP_NAME%%_enable > - > -command="%%PREFIX%%/sbin/%%APP_NAME%%ctl" > -command_args="start" > -pidfile=%%PID_FILE%% > - > -# set defaults > - > -%%APP_NAME%%_enable=${%%APP_NAME%%_enable:-"NO"} > -%%APP_NAME%%_user=${%%APP_NAME%%_user:-"%%USERS%%"} > -%%APP_NAME%%_group=${%%APP_NAME%%_group:-"%%GROUPS%%"} > - > -load_rc_config ${name} > - > -if test -n "${%%APP_NAME%%_java_version}" ; then > - JAVA_HOME=$(JAVA_VERSION="${%%APP_NAME%%_java_version}" > JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVA_HOME | cut -d= -f2) > - procname=$(JAVA_VERSION="${%%APP_NAME%%_java_version}" > JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVAVM_PROG | cut -d= -f2) > -else > - JAVA_HOME=$(JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVA_HOME | > cut -d= -f2) > - procname=$(JAVAVM_DRYRUN=1 %%LOCALBASE%%/bin/java | grep JAVAVM_PROG > | cut -d= -f2) > -fi > - > -export JAVA_HOME > - > -run_rc_command "$1" > --- resin-3.1.12_1.patch ends here --- > >