[Bug 537978] Re: Lucid dhclient can't set hostname
Thierry Carrez
thierry.carrez at ubuntu.com
Mon Mar 22 14:50:24 GMT 2010
Regression was introduced by the fix to:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508804
It could be fixed by fixing the obviously wrong patch, and support two cases:
* Set hostname if new_host_name provided and hostname is not set
* Set hostname if new_host_name provided and old_host_name matches the current hostname
Something like
local current_hostname=$(hostname)
if [ -z "$current_hostname" -o "$current_hostname" = "(none)" -o "$current_hostname" = "localhost" -o "$current_hostname" = "$old_host_name" ]; then
if [ -n "$new_host_name" ]; then
hostname "$new_host_name"
fi
fi
However I am not so sure we should support the use case of the debian
bug since option host-name should only be "honored by dhclient-script(8)
if the hostname for the client machine is not set"...
Bug 482313 would be fixed in the same run (by adding "localhost" to the
set of hostnames considered "unset").
** Bug watch added: Debian Bug tracker #508804
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508804
** Changed in: dhcp3 (Ubuntu)
Status: Confirmed => Triaged
** Also affects: dhcp3 (Ubuntu Lucid)
Importance: Medium
Status: Triaged
--
Lucid dhclient can't set hostname
https://bugs.launchpad.net/bugs/537978
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to dhcp3 in ubuntu.
More information about the Ubuntu-server-bugs
mailing list