From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Aug 10 08:50:00 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B3D36869 for ; Sat, 10 Aug 2013 08:50:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) 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 925D12F90 for ; Sat, 10 Aug 2013 08:50:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r7A8o065046128 for ; Sat, 10 Aug 2013 08:50:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r7A8o0fD046126; Sat, 10 Aug 2013 08:50:00 GMT (envelope-from gnats) Resent-Date: Sat, 10 Aug 2013 08:50:00 GMT Resent-Message-Id: <201308100850.r7A8o0fD046126@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 [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5703D7D2 for ; Sat, 10 Aug 2013 08:44:20 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 432462F6C for ; Sat, 10 Aug 2013 08:44:20 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r7A8iK1p085160 for ; Sat, 10 Aug 2013 08:44:20 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r7A8iKji085159; Sat, 10 Aug 2013 08:44:20 GMT (envelope-from nobody) Message-Id: <201308100844.r7A8iKji085159@oldred.freebsd.org> Date: Sat, 10 Aug 2013 08:44:20 GMT From: Daniel Ylitalo To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/181201: [patch] databases/redis - Allow you to set config path from rc.conf X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Aug 2013 08:50:00 -0000 >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: