[Bug 537978] Re: Lucid dhclient can't set hostname

Thierry Carrez thierry.carrez at ubuntu.com
Thu Apr 1 14:37:30 BST 2010


The upstart task sets the system hostname from /etc/hostname (falling
back to "localhost" if that file is not readable or is empty and no
hostname has yet been set).

The idea here would be honor new_host_name for the same use cases (if
the /etc/hostname file is non-empty). That would support both the first
case (honor DHCP new_host_name if no hostname=localhost) and the case
the debian bug tries to cover (honor further DHCP new_host_name if
hostname was previously set by DHCP)

Something like:

if [ -n "$new_host_name" ]; then
  if [ ! -s /etc/hostname ]; then
     hostname "$new_host_name"
  fi
fi


** Changed in: dhcp3 (Ubuntu Lucid)
       Status: Triaged => In Progress

** Changed in: dhcp3 (Ubuntu Lucid)
     Assignee: (unassigned) => Thierry Carrez (ttx)

-- 
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