On Thursday April 9 2009, Lew Wolfgang wrote:
Randall R Schulz wrote:
I actually think this won't work, and the reason I think that is that I'm virtually certain that my /etc/hosts is _not_ being consulted at all.
I added a line for the address I had before moving across town (and I landed on a part of the network that forced my ISP to give me new IP addresses):
64.142.14.4 64-142-14-4.dsl.static.sonic.net twain-of-yore
And still this:
% host twain-of-yore Host twain-of-yore not found: 3(NXDOMAIN)
Why don't you try "strace ping twain-of-yore | grep hosts". This should show the call to /etc/hosts, if it's being referenced. If it is, do you have a clean /etc/hosts? Non-printing characters might mess things up.
Good idea. % strace ping twain-of-yore -c 1 2>&1 |egrep hosts open("/etc/hosts", O_RDONLY|O_CLOEXEC) = 5 read(5, "#\n# hosts This file desc"..., 4096) = 944 % ll /etc/hosts -rw-r--r-- 1 root root 944 2009-04-09 12:22 /etc/hosts Later on (in the strace output) I see the binding of the address for twain-of-yore and the attempt to ping that address. However, this led to some more interesting discoveries. First of all, that host ("twain-of-yore") is either not in service or is not responding to pings. It's just an address that's still floating in my mind. So I tried to ping twain and smiley (by those names) and... it WORKED! So I straced that ping invocation, and it does indeed open nsswitch.conf, resolv.conf and hosts. Next I traced the "host" command. It _does not_ use nsswitch. It only opens resolv.conf. So there's been some "red herring" effect going on here. I've repeatedly tested my modifications to /etc/hosts by using the "host" command, which apparently is only for querying the DNS system, bypassing any local aliases! Another proud D'Oh! moment.
Regards, Lew
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org