[pkg-dhcp-commits] [SCM] ISC DHCP packaging for Debian branch, master, updated. debian/4.1.1-P1-16.1-53-gf597187

Andrew Pollock apollock at debian.org
Sat Jan 7 07:00:02 UTC 2012


The following commit has been merged in the master branch:
commit f5971872b3fe4e394aea5b381c7b44a550d51113
Author: Andrew Pollock <apollock at debian.org>
Date:   Fri Jan 6 22:58:39 2012 -0800

    Revert to upstream hostname setting behaviour
    
    It seems I got it all wrong with the way the host-name option presents to the client script
    If the option is provided by the server, the client sees it, regardless of whether it requested
    it or not, so not requesting it doesn't solve the issues of #648676

diff --git a/debian/changelog b/debian/changelog
index adbc153..efae789 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,9 +2,9 @@ isc-dhcp (4.2.2-2) unstable; urgency=low
 
   * debian/rules: use dpkg-buildflags to set CFLAGS, and export CFLAGS (closes:
     #643470)
-  * debian/dhclient.conf: remove host-name from the set of options requested
-    from the DHCP server, because having the hostname be changed by default
-    seems to surprise and upset many people (closes: #648676)
+  * debian/dhclient.conf: revert hostname setting behaviour to something
+    equivalent to what upstream ships to avoid surprising people with unwanted
+    hostname changes when changing networks (closes: #648676)
   * debian/dhclient-script.kfreebsd: apply patch from Robert Millan to resync
     dhclient-script with FreeBSD version (closes: #645502)
   * debian/control: add inetutils-ping to the dependencies for isc-dhcp-client
diff --git a/debian/dhclient-script.linux b/debian/dhclient-script.linux
index 4e6ec9d..292bf34 100644
--- a/debian/dhclient-script.linux
+++ b/debian/dhclient-script.linux
@@ -94,8 +94,10 @@ set_hostname() {
         if [ -z "$current_hostname" ] ||
            [ "$current_hostname" = '(none)' ] ||
            [ "$current_hostname" = 'localhost' ] ||
-           [ "$new_host_name" != "$current_hostname" ]; then
-            hostname "$new_host_name"
+           [ "$current_hostname" = "$old_host_name" ]; then
+           if [ "$new_host_name" != "$old_host_name" ]; then
+               hostname "$new_host_name"
+           fi
         fi
     fi
 }
diff --git a/debian/dhclient.conf b/debian/dhclient.conf
index 5d22523..9665381 100644
--- a/debian/dhclient.conf
+++ b/debian/dhclient.conf
@@ -19,7 +19,7 @@ option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
 #supersede domain-name "fugue.com home.vix.com";
 #prepend domain-name-servers 127.0.0.1;
 request subnet-mask, broadcast-address, time-offset, routers,
-	domain-name, domain-name-servers, domain-search,
+	domain-name, domain-name-servers, domain-search, host-name,
 	netbios-name-servers, netbios-scope, interface-mtu,
 	rfc3442-classless-static-routes, ntp-servers;
 #require subnet-mask, domain-name-servers;

-- 
ISC DHCP packaging for Debian



More information about the pkg-dhcp-commits mailing list