Public bug reported: Binary package hint: dhcp-client
I have a set of machines running Ubuntu 9.10. These computers should receive their hostnames via DHCP from a DHCP server. For each host, the "option host-name" is set on the DHCP server and the lease file in "/var/lib/dhcp3" shows me, that the hostname was received. However, the host name won't be set, even if /etc/hostname is deleted. It works this way with Debian. I've figured out, that it can't work, since in /sbin/dhclient-script the following code is used to set the hostname: set_hostname() { local current_hostname=$(hostname) if [ -z "$current_hostname" -o "$current_hostname" = "(none)" ]; then hostname "$new_host_name" fi } If I delete /etc/hostname or keep it empty, Ubuntu sets the hostname automatically to "localhost" - therefore the upper script will fail. It now works, after changing it to: if [ -z "$current_hostname" -o "$current_hostname" = "localhost" ]; then Probably the way, how Ubuntu deals with a missing /etc/hostname differs from the way how Debian does... ** Affects: dhcp3 (Ubuntu) Importance: Undecided Status: New -- dhclient-script ignores "option host-name" from DHCP-server https://bugs.launchpad.net/bugs/482313 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs