I have a number of Hardy hosts that seem to get an invalid hostname placed in their /etc/hosts during the installation process.
There's a line in /etc/hosts on a freshly built, unmodified host that looks like this
127.0.1.1 hostname.subdomain.domain.subdomain.domain hostname.subdomain.domain
The first hostname in that list is invalid.
This causes problems when programs run hostname -f
or an equivalent and get "hostname.subdomain.domain.subdomain.domain" which is an invalid, unresolvable hostname.
uname -n
returns "hostname.subdomain.domain"
On Lucid hosts, the entries look like this:
127.0.1.1 hostname.subdomain.domain hostname
which is pretty much what I was expecting and would like to happen.
Both our Hardy and Lucid machines are built via pxeboot and pressed files. I've scanned through our preseed config for:
- Anything that looks it might change the hostname
- Anything that might change /etc/hosts
I've not found anything.
It is possible for me to manipulate /etc/hosts en masse via puppet, but I would much prefer to understand the cause of the problem and fix it at source.