Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Jan 2006 16:14:05 -0800
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        Doug Barton <dougb@freebsd.org>
Cc:        ports@freebsd.org, Mike Jakubik <mikej@rogers.com>, martines@rochester.rr.com
Subject:   Re: FreeBSD Port: sysutils/smartmontools (more RCng problems)
Message-ID:  <20060107001405.GA27713@odin.ac.hmc.edu>
In-Reply-To: <43BF02F1.6050007@FreeBSD.org>
References:  <43BDB619.5020104@rogers.com> <43BF02F1.6050007@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--h31gzZEtNLTqOjlF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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.
>=20
> Ok, I installed this port and tested it myself, and the problem is the ha=
rd=20
> coded value of smartd_enable at the top of the script. For reasons I don'=
t=20
> quite understand yet, hard coding the value in the script affects the=20
> 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.
/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:

	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.

-- 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

--h31gzZEtNLTqOjlF
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFDvwfMXY6L6fI4GtQRAsr9AJsG6ae2jUqYPpvRlm9Wnxya3VwzAgCgj/OH
HgaA8DfH4WR0G5vbReELLsI=
=D0jM
-----END PGP SIGNATURE-----

--h31gzZEtNLTqOjlF--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060107001405.GA27713>