hostname supplied by dhcp server is not used
I am trying to make lab machines get hostname from DHCP. Currently active solution is to grep ethX's ip address, do a reverse lookup and call hostname with the result. This breaks when another ethernet card is plugged into the machine as ethX does no longer have an ip and ethY has it instead.
Instead of more interface guessing, I want to have a more robust solution, as DHCP server already sends host-name option. I experimented with "get-lease-
I see the option host-name "XXX" in the lease file. But still the machine gets the hostname defined in /etc/hostname (which is "NO-NETWORK" to indicate a network problem to users)
If there is a setting I missed, that enables using DHCP supplied host names, feel free to reject this bug report. But all the solutions I found involved in writing new scripts. I think dhclient should set the host name sent by DHCP server when request host-name is set in the config file.