From owner-freebsd-ports@FreeBSD.ORG Thu Aug 5 05:34:47 2010 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 307DA106566B for ; Thu, 5 Aug 2010 05:34:47 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id CDD498FC23 for ; Thu, 5 Aug 2010 05:34:46 +0000 (UTC) Received: (qmail 1840 invoked by uid 399); 5 Aug 2010 05:34:44 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 5 Aug 2010 05:34:44 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4C5A4D72.1040607@FreeBSD.org> Date: Wed, 04 Aug 2010 22:34:42 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.7) Gecko/20100804 Thunderbird/3.1.1 MIME-Version: 1.0 To: Hiroki Sato References: <20100805.122526.70823211.hrs@allbsd.org> In-Reply-To: <20100805.122526.70823211.hrs@allbsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ports@FreeBSD.org Subject: Re: :${foo_enable:=NO} in rc.d script X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Aug 2010 05:34:47 -0000 On 08/04/10 20:25, Hiroki Sato wrote: > Hi, > > This may be discussed already but I could not find which was correct, > so please point out it if we already have a consensus... > > Well, I am wondering if an rc.d script installed by a port must have > ": ${foo_enable:=NO}" line. That particular style is not mandated, but the policy is that all ports should ship with a default setting of _enable=no. The default is a security issue, in that an affirmative step by the user should be required to enable newly installed services. This also mirrors policy for almost everything in the base. Although in the last few years more services in the base have defaulted to on, of the 20 or so things in /etc/defaults/rc.conf that are enabled by default there are only 3 that are actual services; devd, sendmail_submit, and cron. Most of the rest are either boot-time things (like cleanvar_) or configuration elements of services that are themselves disabled by default (like named_chroot_autoupdate and named_symlink_enable). Requiring the explicit setting of _enable to no (rather than letting it error out) also mirrors the practice in the base of having /etc/defaults/rc.conf which explicitly disables everything. I find it impossible to believe that at this stage in the game there are still users who are confused by how to enable services, and if they are the example in the porter's handbook provides sample text for the comments of the rc.d script to explain what to do. There are also a non-zero number of ports that include instructions in their pkg-message files. > Since most of ports I am maintaining do not have this line, I need to > fix them if setting the variable as NO consistently is preferable. I believe the examples in http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/rc-scripts.html are fairly thorough, and relatively well documented. If you have any questions about the text please don't hesitate to bring them up, I am always looking for ways to improve it. hth, Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso