hostname supplied by dhcp server is not used
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dhcp3 (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
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.
Related branches
tags: | added: regression-release |
This cannot be enabled by default in dhcp client. X becomes very angry if you change the hostname underneath it, so this should only be done at boot time, not when changing the lease at runtime.
However, I do agree that there should be an option to enable this feature for people who know what they are doing.