Re: /etc/hosts completely ignored

From: Fred Souza <fred_at_storming.org>
Date: Wed, 28 May 2003 14:31:10 -0300
> 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."

Received on Wed May 28 2003 - 08:31:15 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:09 UTC