[pkg-dhcp-devel] Bug#609851: [updated] incorrect variables used to set hostname in dhclient-script

Tim Heckman timothy.heckman at gmail.com
Wed Nov 2 22:35:37 UTC 2011


User error on my last diff here is an updated one that is correct:

--- /sbin/dhclient-script 2011-08-09 14:50:08.000000000 -0400
+++ /sbin/dhclient-script 2011-11-02 16:44:47.000000000 -0400
@@ -152,9 +152,9 @@
         ;;
     BOUND|RENEW|REBIND|REBOOT)

- if [ -n "$old_host_name" -a -n "$host_name" -a \
-          "$host_name" != "$old_host_name" ]; then
-        hostname "$new_host_name"
+ if [ ! -s /etc/hostname ]; then
+ # /etc/hostname > 0 set hostname
+ hostname "$new_host_name"
  fi

         if [ -n "$old_ip_address" -a -n "$alias_ip_address" -a \

Tim Heckman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-dhcp-devel/attachments/20111102/2217c756/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dhclient-script.diff
Type: application/octet-stream
Size: 501 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-dhcp-devel/attachments/20111102/2217c756/attachment.obj>


More information about the pkg-dhcp-devel mailing list