[karmic regression] Hostname not set by dhclient when no hostname defined in /etc/hosts

Bug #476491 reported by Stefano Rivera
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
dhcp3 (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

While this would appear to be the same as bug #90388, we've never had an issue in any release before karmic, if the only IPv4 data in /etc/hosts was "127.0.0.1 localhost".

In jaunty and previously, on bootup with no hostname specified, the hostname would be "(none)". In /sbin/dhclient-script, there's the following:

set_hostname() {
    local current_hostname=$(hostname)
    if [ -z "$current_hostname" -o "$current_hostname" = "(none)" ]; then
        hostname "$new_host_name"
    fi
}

However, with karmic, the system will boot with a hostname of "localhost" and the above rule will never fire.

ProblemType: Bug
Architecture: i386
Date: Fri Nov 6 15:31:07 2009
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
Package: dhcp3-client 3.1.2-1ubuntu7
ProcEnviron:
 LANG=en_ZA.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: dhcp3
Uname: Linux 2.6.31-14-generic i686

Related branches

Revision history for this message
Stefano Rivera (stefanor) wrote :
Revision history for this message
Chuck Short (zulcss) wrote :

Thanks for the bug report.

Can you include the output of /etc/hostname?

thanks
chuck

Changed in dhcp3 (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Stefano Rivera (stefanor) wrote :

This is without a /etc/hostname

Changed in dhcp3 (Ubuntu):
status: Incomplete → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dhcp3 - 3.1.3-2ubuntu3

---------------
dhcp3 (3.1.3-2ubuntu3) lucid; urgency=low

  * debian/dhclient-script.linux: Fix regression in host_name option
    handling, so that it's always honored when /etc/hostname is not set,
    fixes LP: #537978, #482313, #90388, #476491
 -- Thierry Carrez <email address hidden> Thu, 01 Apr 2010 16:52:36 +0200

Changed in dhcp3 (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.