From owner-freebsd-ports@FreeBSD.ORG Sat Jan 7 00:42:46 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 3535116A41F; Sat, 7 Jan 2006 00:42:46 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B9EB43D69; Sat, 7 Jan 2006 00:42:41 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id k070geKD030835; Fri, 6 Jan 2006 16:42:41 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id k070gebx030834; Fri, 6 Jan 2006 16:42:40 -0800 Date: Fri, 6 Jan 2006 16:42:40 -0800 From: Brooks Davis To: Doug Barton Message-ID: <20060107004240.GA30545@odin.ac.hmc.edu> References: <43BDB619.5020104@rogers.com> <43BF02F1.6050007@FreeBSD.org> <20060107001405.GA27713@odin.ac.hmc.edu> <43BF0976.703@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="G4iJoqBmSsgzjUCe" Content-Disposition: inline In-Reply-To: <43BF0976.703@FreeBSD.org> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: Brooks Davis , Mike Jakubik , ports@FreeBSD.org, 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:42:46 -0000 --G4iJoqBmSsgzjUCe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 06, 2006 at 04:21:10PM -0800, Doug Barton wrote: > 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=20 > >>>recent RCng commits in 6-STABLE. Smartd does not startup on bootup, it= =20 > >>>has to be manually started. > >>Ok, I installed this port and tested it myself, and the problem is the= =20 > >>hard coded value of smartd_enable at the top of the script. For reasons= I=20 > >>don't quite understand yet, hard coding the value in the script affects= =20 > >>the boot-time operation of the script differently than on the command= =20 > >>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. >=20 > *slaps forehead* Right-o, forgot about the caching. Thanks for the=20 > reminder. >=20 > >/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: >=20 > That's the case with ports, which don't have default values. Yes. In some ways I think the ideal thing would be a search for per command default files... > > load_rc_config ${name} > > > > foo_enable=3D${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. >=20 > That makes sense. That syntax isn't documented in the sh man page, but it= =20 > probably should be. Yes. I ended up writing a short script just to check the syntax before sending that message because there were no docs. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --G4iJoqBmSsgzjUCe Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDvw6AXY6L6fI4GtQRAkf/AKCR5y32Kz2Fp/UUUbzTeua7F9ap6wCeLLbi EuFbLs7AiDY/Wzw/VQvEr5w= =Y0TH -----END PGP SIGNATURE----- --G4iJoqBmSsgzjUCe--