From owner-freebsd-rc@FreeBSD.ORG Fri Jan 13 09:57:12 2012 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 1ED1B106564A; Fri, 13 Jan 2012 09:57:12 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 8586715026F; Fri, 13 Jan 2012 09:57:11 +0000 (UTC) Message-ID: <4F0FFFF7.4090105@FreeBSD.org> Date: Fri, 13 Jan 2012 01:57:11 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Hiroki Sato References: <4F08C95F.6040808@FreeBSD.org> <20120108.081216.1547061187942402256.hrs@allbsd.org> <4F0A22D8.8090206@FreeBSD.org> <20120109.223510.1979757999064039809.hrs@allbsd.org> In-Reply-To: <20120109.223510.1979757999064039809.hrs@allbsd.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-rc@FreeBSD.org Subject: Re: Making use of set_rcvar. X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2012 09:57:12 -0000 On 01/09/2012 05:35, Hiroki Sato wrote: > I prefer to use ${name}_enable because putting the same keyword in > two places always leads to a stupid typo issue. So, here's the thing. I understand what you're saying, I really do. The problem is, you're still wrong. :) There are MANY places where you have to use the value of $name literally already, and typos count in every single one of them: 1. The name of the script file 2. PROVIDE 3. REQUIRE 4. names of service-specific methods, e.g.: start_precmd="foo_prestart" 5. Default values in /etc/defaults/rc.conf 6. rc.conf.5 And that's just off the top of my head. The ideal of being able to copy/paste example rc.d scripts for use with new services without having to change [m]any code sounds great in theory. In practice, search and replace is an absolute necessity. So having one more place where you have to replace the name of the old service with the new one isn't going to hurt anything. I haven't seen any objection to the _substance_ of my proposal, so I'm going to go ahead with it tomorrow. Doug -- You can observe a lot just by watching. -- Yogi Berra Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/