Debian Bug report logs -
#508804
dhclient-script does not set new hostname
Reported by: "harald.dunkel@t-online.de" <harald.dunkel@t-online.de>
Date: Mon, 15 Dec 2008 14:30:01 UTC
Severity: normal
Tags: patch
Found in version dhcp3/3.1.1-5
Fixed in version dhcp3/3.1.3-2
Done: Andrew Pollock <apollock@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Andrew Pollock <apollock@debian.org>:
Bug#508804; Package dhcp3-client.
(Mon, 15 Dec 2008 14:30:03 GMT) (full text, mbox, link).
Acknowledgement sent
to "harald.dunkel@t-online.de" <harald.dunkel@t-online.de>:
New Bug report received and forwarded. Copy sent to Andrew Pollock <apollock@debian.org>.
(Mon, 15 Dec 2008 14:30:03 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: dhcp3-client
Version: 3.1.1-5
If the dhcp server pushes a new host name, then /sbin/dhclient-script
doesn't care. It keeps the old name.
Below is the obvious patch.
Regards
Harri
=================================================================================
--- dhclient-script~ 2008-10-17 08:23:26.000000000 +0200
+++ dhclient-script 2008-12-15 15:21:42.000000000 +0100
@@ -99,13 +99,6 @@
exit $exit_status
}
-set_hostname() {
- local current_hostname=$(hostname)
- if [ -z "$current_hostname" -o "$current_hostname" = "(none)" ];
then
- hostname "$new_host_name"
- fi
-}
-
if [ -n "$new_broadcast_address" ]; then
new_broadcast_arg="broadcast $new_broadcast_address"
fi
@@ -135,6 +128,8 @@
run_hook /etc/dhcp3/dhclient-enter-hooks
run_hookdir /etc/dhcp3/dhclient-enter-hooks.d
+test "$new_host_name" && hostname "$new_host_name"
+
# Execute the operation
case "$reason" in
MEDIUM|ARPCHECK|ARPSEND)
@@ -156,8 +151,6 @@
;;
BOUND|RENEW|REBIND|REBOOT)
- set_hostname
-
if [ -n "$old_ip_address" -a -n "$alias_ip_address" -a \
"$alias_ip_address" != "$old_ip_address" ]; then
# Possible new alias. Remove old alias.
Information forwarded
to debian-bugs-dist@lists.debian.org, Andrew Pollock <apollock@debian.org>:
Bug#508804; Package dhcp3-client.
(Mon, 15 Dec 2008 20:30:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Harald Dunkel <harald.dunkel@t-online.de>:
Extra info received and forwarded to list. Copy sent to Andrew Pollock <apollock@debian.org>.
(Mon, 15 Dec 2008 20:30:03 GMT) (full text, mbox, link).
Message #10 received at 508804@bugs.debian.org (full text, mbox, reply):
PS: I missed to mention that the previous host name was set via DHCP
successfully.
Regards
Harri
Information forwarded
to debian-bugs-dist@lists.debian.org, Andrew Pollock <apollock@debian.org>:
Bug#508804; Package dhcp3-client.
(Tue, 27 Oct 2009 22:12:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Harald Dunkel <harald.dunkel@aixigo.de>:
Extra info received and forwarded to list. Copy sent to Andrew Pollock <apollock@debian.org>.
(Tue, 27 Oct 2009 22:12:03 GMT) (full text, mbox, link).
Message #15 received at 508804@bugs.debian.org (full text, mbox, reply):
Any news about this bug report?
Regards
Harri
Added tag(s) patch.
Request was from Andrew Pollock <apollock@debian.org>
to control@bugs.debian.org.
(Thu, 29 Oct 2009 04:18:53 GMT) (full text, mbox, link).
Reply sent
to Andrew Pollock <apollock@debian.org>:
You have taken responsibility.
(Sat, 09 Jan 2010 03:21:06 GMT) (full text, mbox, link).
Notification sent
to "harald.dunkel@t-online.de" <harald.dunkel@t-online.de>:
Bug acknowledged by developer.
(Sat, 09 Jan 2010 03:21:07 GMT) (full text, mbox, link).
Message #22 received at 508804-close@bugs.debian.org (full text, mbox, reply):
Source: dhcp3
Source-Version: 3.1.3-2
We believe that the bug you reported is fixed in the latest version of
dhcp3, which is due to be installed in the Debian FTP archive:
dhcp-client_3.1.3-2_all.deb
to main/d/dhcp3/dhcp-client_3.1.3-2_all.deb
dhcp3-client-udeb_3.1.3-2_i386.udeb
to main/d/dhcp3/dhcp3-client-udeb_3.1.3-2_i386.udeb
dhcp3-client_3.1.3-2_i386.deb
to main/d/dhcp3/dhcp3-client_3.1.3-2_i386.deb
dhcp3-common_3.1.3-2_i386.deb
to main/d/dhcp3/dhcp3-common_3.1.3-2_i386.deb
dhcp3-dev_3.1.3-2_i386.deb
to main/d/dhcp3/dhcp3-dev_3.1.3-2_i386.deb
dhcp3-relay_3.1.3-2_i386.deb
to main/d/dhcp3/dhcp3-relay_3.1.3-2_i386.deb
dhcp3-server-ldap_3.1.3-2_i386.deb
to main/d/dhcp3/dhcp3-server-ldap_3.1.3-2_i386.deb
dhcp3-server_3.1.3-2_i386.deb
to main/d/dhcp3/dhcp3-server_3.1.3-2_i386.deb
dhcp3_3.1.3-2.diff.gz
to main/d/dhcp3/dhcp3_3.1.3-2.diff.gz
dhcp3_3.1.3-2.dsc
to main/d/dhcp3/dhcp3_3.1.3-2.dsc
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 508804@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Andrew Pollock <apollock@debian.org> (supplier of updated dhcp3 package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Fri, 08 Jan 2010 15:58:56 -0800
Source: dhcp3
Binary: dhcp3-server dhcp3-server-ldap dhcp3-common dhcp3-dev dhcp-client dhcp3-client dhcp3-client-udeb dhcp3-relay
Architecture: source i386 all
Version: 3.1.3-2
Distribution: unstable
Urgency: low
Maintainer: Andrew Pollock <apollock@debian.org>
Changed-By: Andrew Pollock <apollock@debian.org>
Description:
dhcp-client - DHCP client transitional package
dhcp3-client - DHCP client
dhcp3-client-udeb - DHCP Client for debian-installer (udeb)
dhcp3-common - common files used by all the dhcp3* packages
dhcp3-dev - API for accessing and modifying the DHCP server and client state
dhcp3-relay - DHCP relay daemon
dhcp3-server - DHCP server for automatic IP address assignment
dhcp3-server-ldap - DHCP server able to use LDAP as backend
Closes: 508804 531050 559160
Changes:
dhcp3 (3.1.3-2) unstable; urgency=low
.
* Fix dhclient-script so that changes in the DHCP-provided hostname cause a
hostname change to occur on the client (closes: #508804)
* Remove unnecessary sleep from dhclient-script
* Reorganise the generation of /etc/resolv.conf so that the nameservers are
first
* Generate an /etc/resolv.conf when no domain-name is provided but a
domain-search is
* Add patch from Petter Reinholdtsen to fix SIGPIPE when talking to LDAP
server (closes: #559160)
* Add patch from Petter Reinholdtsen to fix memory leak in LDAP code
(closes: #531050)
Checksums-Sha1:
f7bb6c97bc6b6525dcb1a1fe17a8948ec4d61b6d 1163 dhcp3_3.1.3-2.dsc
a0899645a99ebfd3fdc53feab90b62dbab586a85 132863 dhcp3_3.1.3-2.diff.gz
5a08df29d90fc6a2990c9ddd07dbab95c011f1a9 332538 dhcp3-server_3.1.3-2_i386.deb
f46fb08db101e7265c2cd3b93448e3a1b494ca76 286000 dhcp3-server-ldap_3.1.3-2_i386.deb
13bf1417318c25afaaeb093a805f8c0d1f0afa47 292002 dhcp3-common_3.1.3-2_i386.deb
102a87932e4253ad8679ca958fbb65a9fb9cdbbb 106074 dhcp3-dev_3.1.3-2_i386.deb
f7d69d382eeaf42a19a9b36836fa98eb6d71f46c 23632 dhcp-client_3.1.3-2_all.deb
5124eccab31285485e4698bfd9768eb0207845b5 223456 dhcp3-client_3.1.3-2_i386.deb
c4fec1a5534f82d57b525aab62ed91c8ace4e8ef 166160 dhcp3-client-udeb_3.1.3-2_i386.udeb
1746d0865c01efa1ac35fc61b0bdf51b329f264c 103102 dhcp3-relay_3.1.3-2_i386.deb
Checksums-Sha256:
1223ee0d5b833a6d9ea3c9fb3ac675cadf3138a68a8fdbe4be385ebf035fd46b 1163 dhcp3_3.1.3-2.dsc
3dfdad41dc0f12400cfc231e75676afe1e10146670972fb93d108e7481ae2ba9 132863 dhcp3_3.1.3-2.diff.gz
7a1d5f0e394039ff9b9219323e62f6195603add19a5cb3ee322f8d269a51008f 332538 dhcp3-server_3.1.3-2_i386.deb
c9a5dde1377f2f25e20ec68c92d2081496fa612369e5cc55b5f26672013adb05 286000 dhcp3-server-ldap_3.1.3-2_i386.deb
2ca84e10e108ac1325622de653beb6797a6f2fb6fedf4f1e00dec5d98a1010c4 292002 dhcp3-common_3.1.3-2_i386.deb
77fecc2436f155b875687e57e20f42f8d95a0ac953602d449893e11d71eb0443 106074 dhcp3-dev_3.1.3-2_i386.deb
58f1a004b2ca83d06bb3be3e7dffbf96b43b6151088c9323e412af6181da4018 23632 dhcp-client_3.1.3-2_all.deb
a34437b1f4da39e40bcfd9e03ed276d5130e36b717e7fc2aff2eb96db8730f77 223456 dhcp3-client_3.1.3-2_i386.deb
377103bfeaf362a6acc83a46e12627f59fdbb516a269b2f1bc58b376b5d0f967 166160 dhcp3-client-udeb_3.1.3-2_i386.udeb
84ade3eec68a9f1640452d4c329466883ec367084515c62f8990c9c75d0a7d87 103102 dhcp3-relay_3.1.3-2_i386.deb
Files:
d14e719d882cb3e571608fb2d6936f1b 1163 net important dhcp3_3.1.3-2.dsc
262b65dc2c1dee16cc440bc4d15e4e87 132863 net important dhcp3_3.1.3-2.diff.gz
acdc327acf6bde694ac2fc5696edeb28 332538 net optional dhcp3-server_3.1.3-2_i386.deb
fd10e404968e1c78ebdb7ac03ea23660 286000 net optional dhcp3-server-ldap_3.1.3-2_i386.deb
49471ccc2befca19378d7065afab6807 292002 net important dhcp3-common_3.1.3-2_i386.deb
0719d8c7dccf04697755831435fb1d74 106074 devel optional dhcp3-dev_3.1.3-2_i386.deb
2d4a2f54abcf16f1f0079c8192776c0b 23632 net extra dhcp-client_3.1.3-2_all.deb
e29a20cdd17c07d2c1b8faf9fffac90b 223456 net important dhcp3-client_3.1.3-2_i386.deb
70b36b800f70ad394b1d2d9d862d2343 166160 debian-installer extra dhcp3-client-udeb_3.1.3-2_i386.udeb
1431b087dea431bb45954b04f4a63f8b 103102 net optional dhcp3-relay_3.1.3-2_i386.deb
Package-Type: udeb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAktH32MACgkQIblXXKfZFgKfYgCgpMyyvvYLSFCFxbXvsCj2Fp1/
+kwAoLtoSwRZ/jo18iS6eTeLL5lPKcq+
=PaHU
-----END PGP SIGNATURE-----
Information forwarded
to debian-bugs-dist@lists.debian.org, Andrew Pollock <apollock@debian.org>:
Bug#508804; Package dhcp3-client.
(Mon, 15 Feb 2010 08:27:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Harald Dunkel <harald.dunkel@aixigo.de>:
Extra info received and forwarded to list. Copy sent to Andrew Pollock <apollock@debian.org>.
(Mon, 15 Feb 2010 08:27:03 GMT) (full text, mbox, link).
Message #27 received at 508804@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
AFAICS setting the hostname via dhcp still does not work,
even though the debug hooks show that both the old_host_name
and the new_host_name are sent. Attached you can find the
debug output.
Here is a suggested patch:
--- /sbin/dhclient-script.orig 2010-01-09 04:31:48.000000000 +0100
+++ /sbin/dhclient-script 2010-02-15 08:35:32.000000000 +0100
@@ -157,8 +157,7 @@
BOUND|RENEW|REBIND|REBOOT)
- if [ -n "$old_host_name" -a -n "$host_name" -a \
- "$host_name" != "$old_host_name" ]; then
+ if [ -n "$new_host_name" ]; then
hostname "$new_host_name"
fi
Regards
Harri
[dhclient-script.debug (text/plain, attachment)]
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Tue, 16 Mar 2010 07:27:17 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sun Jan 7 21:22:39 2018;
Machine Name:
beach
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.