From owner-freebsd-ports@FreeBSD.ORG Sat Jan 7 00:21:17 2006 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1954F16A41F for ; Sat, 7 Jan 2006 00:21:17 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mail2.fluidhosting.com [204.14.90.12]) by mx1.FreeBSD.org (Postfix) with SMTP id 945D443D45 for ; Sat, 7 Jan 2006 00:21:16 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 30167 invoked by uid 399); 7 Jan 2006 00:21:12 -0000 Received: from localhost (HELO ?192.168.1.100?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 7 Jan 2006 00:21:12 -0000 Message-ID: <43BF0976.703@FreeBSD.org> Date: Fri, 06 Jan 2006 16:21:10 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5 (X11/20051226) MIME-Version: 1.0 To: Brooks Davis References: <43BDB619.5020104@rogers.com> <43BF02F1.6050007@FreeBSD.org> <20060107001405.GA27713@odin.ac.hmc.edu> In-Reply-To: <20060107001405.GA27713@odin.ac.hmc.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ports@freebsd.org, Mike Jakubik , martines@rochester.rr.com Subject: Re: FreeBSD Port: sysutils/smartmontools (more RCng problems) 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: Sat, 07 Jan 2006 00:21:17 -0000 Brooks Davis wrote: > On Fri, Jan 06, 2006 at 03:53:21PM -0800, Doug Barton wrote: >> Mike Jakubik wrote: >>> This is yet another port that does not work properly because of the >>> recent RCng commits in 6-STABLE. Smartd does not startup on bootup, it >>> has to be manually started. >> Ok, I installed this port and tested it myself, and the problem is the hard >> coded value of smartd_enable at the top of the script. For reasons I don't >> quite understand yet, hard coding the value in the script affects the >> boot-time operation of the script differently than on the command line. > > The reason the two cases behave differently is that during boot > the initial call to load_rc_config in /etc/rc causes /etc/rc.conf > to be read and there after the fact that it's read it cached. *slaps forehead* Right-o, forgot about the caching. Thanks for the reminder. > /etc/rc.conf.d/"$name" will be read, but I doubt there are many users > of that feature. The variables need to be set if and only if they are > unset after load_rc_config is run like so: That's the case with ports, which don't have default values. > load_rc_config ${name} > > foo_enable=${foo_enable-NO} > > run_rc_command "$1" > > Someone (mtm IIRC) told me to use the -NO as opposed to the :-NO syntax > because empty, but defined values should not be overridden. I believe > that is the correct thing to do. That makes sense. That syntax isn't documented in the sh man page, but it probably should be. Doug -- This .signature sanitized for your protection