Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Aug 2013 08:44:20 GMT
From:      Daniel Ylitalo <daniel@blodan.se>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/181201: [patch] databases/redis - Allow you to set config path from rc.conf
Message-ID:  <201308100844.r7A8iKji085159@oldred.freebsd.org>
Resent-Message-ID: <201308100850.r7A8o0fD046126@freefall.freebsd.org>

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

>Number:         181201
>Category:       ports
>Synopsis:       [patch] databases/redis - Allow you to set config path 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:   Sat Aug 10 08:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Daniel Ylitalo
>Release:        9.1-RELEASE-p4
>Organization:
>Environment:
FreeBSD 9.1-RELEASE-p4 FreeBSD 9.1-RELEASE-p4 #0: Mon Jun 17 11:42:37 UTC 2013     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Many ports allows you to set the config path in /etc/rc.conf incase you donīt use the default path. This so when updating a port you donīt have to change the rc.d file itself after the update as it gets overwritten.

The attached patch allows you to do this.

Other ports that has this functionality is mysql55-server, openvpn, snmpd, nrpe2 among others.
>How-To-Repeat:
- Change the config path in /usr/local/etc/rc.d/redis
- Upgrade the port
- Your changes are missing
>Fix:
See attached patch

Patch attached with submission follows:

--- /usr/local/etc/rc.d/redis   2013-07-25 10:40:15.000000000 +0200
+++ /usr/local/etc/rc.d/redis.orig      2013-08-10 10:32:38.000000000 +0200
@@ -21,14 +21,15 @@
 extra_commands="reload"

 command="/usr/local/bin/redis-server"
-config_file="/usr/local/etc/203configs/redis/$name.conf"
-command_args="${config_file}"
 pidfile="/var/run/redis/$name.pid"
-required_files="${config_file}"

 # read configuration and set defaults
 load_rc_config "$name"
 : ${redis_enable="NO"}
 : ${redis_user="redis"}
+: ${redis_config="/usr/local/etc/$name.conf"}
+
+required_files="${redis_config}"
+command_args="${redis_config}"

 run_rc_command "$1"

>Release-Note:
>Audit-Trail:
>Unformatted:



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