[pkg-dhcp-devel] Bug#609851: isc-dhcp NMU dhclient-script patch

Tim Heckman timothy.heckman at gmail.com
Wed Nov 2 22:05:28 UTC 2011


Good news and bad news.  The good news I have a patch to
"/sbin/dhclient-script" that fixes this.  The bad news is that is causes
/etc/init.d/hostname.sh to fail at boot.  To have the hostname be set by
dhclient, with this patch, "/etc/hostname" must exist but have a length of
zero:

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

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

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

The hostname.sh issue isn't critical, but it's still a bit unsettling to
see init scripts unhappy at boot.  I'll work on something for
"/etc/init.d/hostname.sh" so that it doesn't fail on boot.  Things just
can't be easy, can they?

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


More information about the pkg-dhcp-devel mailing list