Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Mar 2014 22:32:43 GMT
From:      Daniel Ylitalo <daniel@blodan.se>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/187678: [PATCH] Allow config path to be set from rc.conf
Message-ID:  <201403172232.s2HMWh87065166@cgiserv.freebsd.org>
Resent-Message-ID: <201403172240.s2HMe0ec028442@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403172232.s2HMWh87065166>