Subject: Re: re-reading /etc/resolv.conf on change
To: NetBSD Userlevel Technical Discussion List <tech-userlevel@NetBSD.org>
From: Greywolf <email@example.com>
Date: 01/05/2004 10:23:16
Thus spake Greg A. Woods ("GAW> ") sometime Yesterday...
GAW> I think the right solution for interactive applications would be for
GAW> them to use the kernel's "domainname" setting as the default domain and
GAW> for them to qualify un-qualified hostnames themselves (and yes I know
GAW> some people seem to think this is a NIS thing, but it's not -- it's just
GAW> a string setting maintained in the kernel and it even has a very
GAW> convenient and meaningful name for this very purpose!).
The thing is that domainname was intended as a NIS thing. I have been in
several shops which have had separate DNS and NIS domains (mine is now one
of them). Why? I'm not sure; I'm currently doing it because my NIS does
not need to defer to DNS for its host lookup.
To link the two might cause some consternation; honestly, I'm rather
surprised that you are the person to suggest this.
Regarding searchlist and domain in resolv.conf, they do exactly what they
were put there to do. I've found it extremely handy, while working at
an employee-friendly company, to put my home domain into my resolv.conf
at work on the searchlist -- if the host wasn't locally resolvable, look
at my home domain server and connect to it.
If we REALLY want to do this right%, we should have NIS and DNS domains
living in two separate spots. I'm not entirely convinced that NIS should
be looking in the kernel for it, if DNS isn't doing so, especially given
that ypbind/ypserv operate in userland. But it's the de facto standard
handed down from Sun, so that leaves us with the other alternative which
I think would be that the DNS domain should probably ALSO live in the kernel,
but that would break DNS' behaviour in much the same way as the reverse
situation above, so we are stuck with what we have, more or less.
NetBSD: Multi-platform OS
% for some appropriate value of "right"...