ports/187678: [PATCH] Allow config path to be set from rc.conf
Daniel Ylitalo
daniel at blodan.se
Mon Mar 17 22:40:01 UTC 2014
>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:
More information about the freebsd-ports-bugs
mailing list