[pkg-dhcp-commits] [SCM] ISC DHCP packaging for Debian branch, master, updated. 954dedb356800b60370bbd67c1110e7359096ba3
Andrew Pollock
apollock at debian.org
Sun Nov 1 23:04:19 UTC 2009
The following commit has been merged in the master branch:
commit 954dedb356800b60370bbd67c1110e7359096ba3
Author: Andrew Pollock <apollock at debian.org>
Date: Sun Nov 1 15:02:20 2009 -0800
Fixes to dhclient-script
Remove unnecessary sleep call
Make the hostname get updated whenever the DHCP server provides a different
value for the host-name option
diff --git a/debian/changelog b/debian/changelog
index 40632dd..be39442 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,8 +3,11 @@ isc-dhcp (4.1.0-2) UNRELEASED; urgency=low
* debian/README.Debian: update for current upstream version, specifically
mention that DHCPv6 is disabled
* debian/rules: provide a pointer to why DHCPv6 is disabled
+ * Fix dhclient-script so that changes in the DHCP-provided hostname
+ cause a hostname change to occur on the client
+ * Remove unnecessary sleep from dhclient-script
- -- Andrew Pollock <apollock at debian.org> Sat, 03 Oct 2009 15:51:31 -0700
+ -- Andrew Pollock <apollock at debian.org> Sun, 01 Nov 2009 15:02:10 -0800
isc-dhcp (4.1.0-1) experimental; urgency=low
diff --git a/debian/dhclient-script.kfreebsd b/debian/dhclient-script.kfreebsd
index 22c7fad..c7985ff 100644
--- a/debian/dhclient-script.kfreebsd
+++ b/debian/dhclient-script.kfreebsd
@@ -81,13 +81,6 @@ exit_with_hooks() {
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
@@ -136,7 +129,10 @@ case "$reason" in
;;
BOUND|RENEW|REBIND|REBOOT)
- set_hostname
+ 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 \
"$alias_ip_address" != "$old_ip_address" ]; then
@@ -217,7 +213,6 @@ case "$reason" in
ifconfig $interface inet $new_ip_address $new_subnet_arg \
$new_broadcast_arg $medium $mtu_arg
- sleep 1
set -- $new_routers
first_router="$1"
diff --git a/debian/dhclient-script.linux b/debian/dhclient-script.linux
index b72e501..222b748 100644
--- a/debian/dhclient-script.linux
+++ b/debian/dhclient-script.linux
@@ -99,13 +99,6 @@ exit_with_hooks() {
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
@@ -156,12 +149,13 @@ case "$reason" in
fi
ifconfig $interface inet 0 up
- # We need to give the kernel some time to get the interface up.
- sleep 1
;;
BOUND|RENEW|REBIND|REBOOT)
- set_hostname
+ 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 \
"$alias_ip_address" != "$old_ip_address" ]; then
--
ISC DHCP packaging for Debian
More information about the pkg-dhcp-commits
mailing list