Bob Proulx wrote: > Glenn English wrote: > > And it expects to find the machine-name and the FQDN, on one > > line. Maybe near the top -- I haven't looked into that. > > The format of the /etc/hosts file is a line by line linear search from > top to bottom for the desired information. Reading of the file stops > as soon as the data requested is found.
It turns out that this is configurable. man host.conf The file /etc/host.conf contains configuration information specific to the resolver library. ... multi Valid values are on and off. If set to on, the resolv+ library will return all valid addresses for a host that appears in the /etc/hosts file, instead of only the first. This is off by default, as it may cause a substantial performance loss at sites with large hosts files. The default in Debian is "multi on" and so it won't stop at the first matching line. (Which seems fine since the /etc/hosts file is very short on modern systems that use the domain name system.) That memory must have come from another system perhaps quite long ago. Bob
signature.asc
Description: Digital signature