Subject: Re: re-reading /etc/resolv.conf on change
To: Luke Mewburn <>
From: Jason Thorpe <>
List: tech-userlevel
Date: 01/06/2004 09:21:52
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 <>

content-type: application/pgp-signature; x-mac-type=70674453;
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

Version: GnuPG v1.2.3 (Darwin)