Public bug reported:
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-hostnames yes" and, "option host-name XXX" options on
the server. In the client I experimented with "request;" and request
..., host-name,...; options in dhclient.conf
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.
** Affects: dhcp3 (Ubuntu)
Importance: Undecided
Status: Unconfirmed
--
hostname supplied by dhcp server is not used
https://launchpad.net/bugs/90388
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs