Geez this is ugly. If that's the way it is, then I'll just write a
replacement for host to work sensibly.
If this is the designed behavior of the host command, then host will
hang anytime DNS is stopped.
Very bad.
--
You received this bug notification because you are a member of Ubuntu
Server
root@net1# strings /lib/libresolv.so.2 | grep /etc
/etc/hosts
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to bind9 in ubuntu.
https://bugs.launchpad.net/bugs/736149
Title:
Ubuntu 10.10 /etc/hosts ignored by /lib/resolv.so.2
--
ping works as expected...
root@net1# strace -e open /bin/ping localhost 21
open(/etc/ld.so.cache, O_RDONLY) = 3
open(/lib/libc.so.6, O_RDONLY)= 3
open(/etc/resolv.conf, O_RDONLY) = 4
open(/etc/resolv.conf, O_RDONLY) = 4
open(/etc/nsswitch.conf, O_RDONLY)= 4
The 'host' command is not reading /etc/hosts by design.
The command:
host foo dns-server
performs a dns lookup of host 'foo' from dns-server. If dns-server is not
provided, as in:
host foo
then, per the man page:
server is an optional argument which is either the name or IP address