Subject: Re: re-reading /etc/resolv.conf on change
To: Luke Mewburn <lukem@NetBSD.org>
From: Jason Thorpe <thorpej@wasabisystems.com>
List: tech-userlevel
Date: 01/06/2004 09:21:52
--Apple-Mail-5-613231620
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed
On Jan 5, 2004, at 3:38 PM, Luke Mewburn wrote:
> How's this for an solution?
This seems far more complicated than necessary. Having to touch
nsswitch.conf seems non-obvious. After all, you already edited the
file you care about!
I don't really see this as a better solution than the resolver simply
detecting the condition itself and coping.
>
> Implement an optional "init" method for each nsswitch
> backend database (YP, DNS, files), which is called
> whenever nsdispatch reloads /etc/nsswitch.conf.
>
> This provides each database type an opportunity to (re)initialize
> itself, which may be useful to simplify various implementations
> that retain state.
>
> Then end user then just "touchs" /etc/nsswitch.conf to force a
> reinit of the method lookups used by nsdispatch (as currently occurs)
> and a reinit of the database backend.
>
-- Jason R. Thorpe <thorpej@wasabisystems.com>
--Apple-Mail-5-613231620
content-type: application/pgp-signature; x-mac-type=70674453;
name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)
iD8DBQE/+u6wOpVKkaBm8XkRAihqAJ9FnoOWZujMaTfrAVi2kcT2E+XnMQCg1J0y
PHFg9Py39mD3uGeRheUowjk=
=cDuf
-----END PGP SIGNATURE-----
--Apple-Mail-5-613231620--