Package: isc-dhcp-client
Version: 4.1.1-P1-15+squeeze2
Severity: normal
Tags: patch
The logic in Debian's dhclient-script as when to set hostname to the DHCP supplied new_host_name seems completly broken. It uses an now unset variable ``host_name''; since that will always be empty, the test always fails and the hostname ist never set.
The idea behind the test in the upstream original dhclient-script seems to be
-- if the current hostname is different from what the last invocation of DHCP gave, it was probably set by the user, so leave it alone.
-- otherwise, if the hostname obtained by DHCP this time is the same as it was last time, there's no need to change is, so leave it alone.
-- else, set the hostname to what DHCP supplied.
The attached patch implements this logic (or so I hope).
-- System Information:
Debian Release: 6.0.1
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.38.2.wap (SMP w/1 CPU core)
Locale: LANG=de_DE at euro, LC_CTYPE=de_DE at euro (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/dash
Versions of packages isc-dhcp-client depends on:
ii debianutils 3.4 Miscellaneous utilities specific t
ii iproute 20100519-3 networking and traffic control too
ii isc-dhcp-common 4.1.1-P1-15+squeeze2 common files used by all the isc-d
ii libc6 2.11.2-10 Embedded GNU C Library: Shared lib
isc-dhcp-client recommends no packages.
Versions of packages isc-dhcp-client suggests:
pn avahi-autoipd <none> (no description available)
pn resolvconf <none> (no description available)
-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: text/x-diff
Size: 961 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-dhcp-devel/attachments/20110527/c3e85b43/attachment.diff>