From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Mar 17 22:40:01 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 519327BD for ; Mon, 17 Mar 2014 22:40:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 145C3298 for ; Mon, 17 Mar 2014 22:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s2HMe06M028443 for ; Mon, 17 Mar 2014 22:40:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s2HMe0ec028442; Mon, 17 Mar 2014 22:40:00 GMT (envelope-from gnats) Resent-Date: Mon, 17 Mar 2014 22:40:00 GMT Resent-Message-Id: <201403172240.s2HMe0ec028442@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Daniel Ylitalo Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74218339 for ; Mon, 17 Mar 2014 22:32:44 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 60CA0231 for ; Mon, 17 Mar 2014 22:32:44 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s2HMWhbu065171 for ; Mon, 17 Mar 2014 22:32:43 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s2HMWh87065166; Mon, 17 Mar 2014 22:32:43 GMT (envelope-from nobody) Message-Id: <201403172232.s2HMWh87065166@cgiserv.freebsd.org> Date: Mon, 17 Mar 2014 22:32:43 GMT From: Daniel Ylitalo To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/187678: [PATCH] Allow config path to be set from rc.conf X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Mar 2014 22:40:01 -0000 >Number: 187678 >Category: ports >Synopsis: [PATCH] Allow config path to be set from rc.conf >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Mar 17 22:40:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Daniel Ylitalo >Release: 10.0-RELEASE >Organization: 203 Web Group AB >Environment: >Description: Many ports allow one to specify a custom path to the config in rc.conf so that one wont have to re-edit the rc.d script after each update (which overwrites the rc.d file) >How-To-Repeat: >Fix: Attaching patch Patch attached with submission follows: --- proftpd.in.orig 2014-03-17 22:41:14.000000000 +0100 +++ proftpd.in 2014-03-17 23:28:42.000000000 +0100 @@ -22,9 +22,13 @@ name=proftpd rcvar=proftpd_enable +proftpd_enable=${proftpd_enable:="NO"} +proftpd_config=${proftpd_config:="%%PREFIX%%/etc/proftpd.conf"} + command=%%PREFIX%%/sbin/proftpd -pidfile=$(grep PidFile /usr/local/etc/proftpd.conf | awk '{print($2)}') -required_files=%%PREFIX%%/etc/proftpd.conf +command_args="-c ${proftpd_config}" +pidfile=$(grep PidFile ${proftpd_config} | awk '{print($2)}') +required_files=${proftpd_config} stop_postcmd=stop_postcmd @@ -35,8 +39,6 @@ # set defaults -proftpd_enable=${proftpd_enable:-"NO"} - extra_commands="reload" load_rc_config $name >Release-Note: >Audit-Trail: >Unformatted: