From owner-freebsd-ports@FreeBSD.ORG Thu Aug 5 03:27:37 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 678EF1065672 for ; Thu, 5 Aug 2010 03:27:37 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper-int.allbsd.org [IPv6:2001:2f0:104:e002::2]) by mx1.freebsd.org (Postfix) with ESMTP id 6035F8FC08 for ; Thu, 5 Aug 2010 03:27:36 +0000 (UTC) Received: from alph.d.allbsd.org (p2176-ipbf406funabasi.chiba.ocn.ne.jp [124.86.72.176]) (authenticated bits=128) by mail.allbsd.org (8.14.4/8.14.3) with ESMTP id o753R8K3022657 for ; Thu, 5 Aug 2010 12:27:18 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.4/8.14.4) with ESMTP id o753R7g0010823 for ; Thu, 5 Aug 2010 12:27:08 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Thu, 05 Aug 2010 12:25:26 +0900 (JST) Message-Id: <20100805.122526.70823211.hrs@allbsd.org> To: ports@FreeBSD.org From: Hiroki Sato X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Thu_Aug__5_12_25_26_2010_092)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.95.3 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.3 (mail.allbsd.org [133.31.130.32]); Thu, 05 Aug 2010 12:27:24 +0900 (JST) X-Spam-Status: No, score=-99.3 required=13.0 tests=AWL,CONTENT_TYPE_PRESENT, RCVD_IN_PBL, SPF_SOFTFAIL, USER_IN_WHITELIST, X_MAILER_PRESENT autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gatekeeper.allbsd.org Cc: Subject: :${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 03:27:37 -0000 ----Security_Multipart(Thu_Aug__5_12_25_26_2010_092)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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. An example in the porter's handbook includes this, and I can understand it works fine. My question is "this is really needed or not". When $foo_enable is not defined, checkyesno() displays "WARNING: $foo_enable is not set properly - see rc.conf(5)" and it is interpreted as NO. I was thinking this message is useful for letting people know which knob(s) should be configured by themselves after the installation, but recently someone pointed out this was not consistent and the default value should be defined as NO in the script. I can understand setting it as NO by default and allowing a user to override YES/NO in rc.conf work fine and intuitive. However, is there a case that the $foo_enable is set as YES by default? If not, what is the reason why the warning is displayed instead of simply thinking it as NO when $foo_enable is undefined? My feeling is that 1) $foo_enable should be interpreted as NO if not defined and a user should configure it (YES/NO) by herself after the installation, and 2) other variables like $foo_flags or $foo_pidfile should have their default values to allow the software be able to run simply by adding a line foo_enable=YES into rc.conf. While I do not have a strong opinion on 1), I am not sure if it is the correct interpretation. Setting the variable as NO by default will make the warning message disappear, but in that case it is difficult for the user to find the knobs. And if it is equivalent to NO when the variable is not defined, I don't understand what is the advantage of setting it as NO explicitly by default. 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. -- Hiroki ----Security_Multipart(Thu_Aug__5_12_25_26_2010_092)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAkxaLyYACgkQTyzT2CeTzy262QCaAgUN9sXeobhyqHNM0M1awTDc 1ZUAoMlLTdY60j48efrOu7aV7CqGaU/T =iEVh -----END PGP SIGNATURE----- ----Security_Multipart(Thu_Aug__5_12_25_26_2010_092)----