/etc/hosts completely ignored
Fred Souza
fred at storming.org
Wed May 28 10:31:15 PDT 2003
> Umm, host(1) looks in the DNS for hostnames, as per the manpage:
>
> DESCRIPTION
> Host looks for information about Internet hosts. It gets this informa-
> tion from a set of interconnected servers that are spread across the
> world.
>
> It doesn't use /etc/hosts, just DNS. That's by design.
I'm not sure about that. If you read all the way to end of the manpage,
you'll see this part too:
ENVIRONMENT
HOSTALIASES Name of file containing (host alias, full hostname)
pairs.
FILES
/etc/resolv.conf See resolver(5).
It could mean, then, that if the environment variable HOSTALIASES is
NOT set, it'll use only DNS. But then again, you must use a dot at the
end of the host if you don't want it to include that by itself.
It's weird, however, that src/contrib/bind/bin/host/host.c does not
match HOSTALIASES on a grep. Could it mean that (as usual) ISC's
documentation makes little sense according to its source, and that
you're right and host does not use non-DNS mechanisms at all for name
resolution?
Fred
--
"Chemistry professors never die, they just fail to react."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20030528/214022fe/attachment.bin
More information about the freebsd-current
mailing list