[pkg-dhcp-devel] Bug#609851: summary

Helmut Grohne helmut at subdivi.de
Sat Dec 3 23:00:06 UTC 2011

This is a summary for those attempting to squash rc bugs.

As of 4.2.2-1 /sbin/dhclient-script implements a set_hostname function
that unconditionally updates the host name if request host-name is set
in /etc/dhcp/dhclient.conf which is the default. This means that in a
default setup of dhcp any dhcp server can change the hostname. It is
known that this break (among other things) X11. It also contradicts the
documentation (man dhcp-options) "This option is only honored by

In my experience many packages assume that the hostname is stable. The
most prominent example is X11. It is imho not reasonable to change this
assumption without at this point. The default for a newly installed
isc-dhcp-client should be not to update the hostname from a dhcp server
sent host-name. In order to not break current setup this requires a
change in the implementation that obeys the documentation quoted above.

The following patch will implement the documented behaviour:

--- debian/dhclient-script.linux        2011-12-03 23:53:36.000000000 +0100
+++ debian/dhclient-script.linux.new    2011-12-03 23:56:34.000000000 +0100
@@ -90,12 +90,11 @@
     if [ -n "$new_host_name" ]; then
-        # current host name is empty, '(none)' or 'localhost' or differs from new one from DHCP
+        # current host name is empty, '(none)' or 'localhost' 
         if [ -z "$current_hostname" ] ||
            [ "$current_hostname" = '(none)' ] ||
-           [ "$current_hostname" = 'localhost' ] ||
-           [ "$new_host_name" != "$current_hostname" ]; then
-            hostname "$new_host_name"
+           [ "$current_hostname" = 'localhost' ]; then
+               hostname "$new_host_name"


More information about the pkg-dhcp-devel mailing list