[pkg-dhcp-devel] Bug#628141: patch that should fix the isue

Peter Marschall peter at adpm.de
Sat Jun 18 16:36:23 UTC 2011


Hi Andrew,

Tomas has a point here.
While the part regarding the invalid variables was fixed in 4.1.1-17,
the logic still looks a bit fishy:
  "only set the host name if the old one and the new one are given"
(I am aware that I am the one to blame ;-)

Please find attached a patch that hopefully fixes the issue for good:
Here's the logic it tries to implement:

For the non-udeb case, set the hostname in Linux & kfreebsd only if
1) the new hostname isn't empty
   <=> make sure that we do not reset the hostname to empty

2) the current hostname is empty (or '(none)' or 'localhost') or
   matches the old hostname from DHCP
   <=> make sure that we only set the host name if there is
       no valid one or if the old hostname came from DHCP too

3) the current hostname is empty or
   the new hostname from DHCP differs from the old one from DHCP
   <=> make sure that we set the host name only if it really changed

If you think it is the correct solution, please consider including it in the 
next release of isc-dhcp for Debian

Best regards
Peter

-- 
Peter Marschall
peter at adpm.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-dhclient-script.-harmonize-logic-for-setting-the-hos.patch
Type: text/x-patch
Size: 4936 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-dhcp-devel/attachments/20110618/61ddd997/attachment.bin>


More information about the pkg-dhcp-devel mailing list