On Mon, 22 Jun 2015, Frank Pikelner wrote:
The second /etc/hosts file should be correct but dynamic DNS is not working. Is there something in the implementation that requires the first case, or should just the order of the /etc/hosts entries modified so that the localhost appears second in the list?
I have machines that do DDNS triggered from DHCP, and it works just fine without having the incorrect /etc/hosts. Indeed I just have:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
To get the client to send the correct hostname, I use:
/etc/sysconfig/network-scripts/ifcfg-eth0: DHCP_HOSTNAME="whatever.you.want"
That makes it work perfectly for me.
jh