[pkg-dhcp-commits] [SCM] ISC DHCP packaging for Debian branch, master, updated. debian/4.1.1-P1-16.1-38-g358d1d1

Andrew Pollock apollock at debian.org
Sun Aug 28 05:23:25 UTC 2011


The following commit has been merged in the master branch:
commit 358d1d1f34ffd985884097b7eb1b1a43b57d8d68
Author: Andrew Pollock <apollock at debian.org>
Date:   Sat Aug 27 22:22:24 2011 -0700

    debug hooks: only use one common source
    
    Patch from Peter Marschall
    
    Stop duplication of debug-enter and debug-exit that only differ
    in the path of the script shown.
    Replace them with one common source, but keep them separate in the packages.

diff --git a/debian/changelog b/debian/changelog
index 861d0fc..d57a57b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -39,8 +39,9 @@ isc-dhcp (4.2.2-1) unstable; urgency=low
     to factor out the hostname setting to a separate function
   * debian/dhclient-script.{linux,kfreebsd}: applied patch from Peter Marschall
     to harmonize the logic for setting the hostname (closes: #246155)
+  * apply patch from Peter Marschall to use one common script for the debug hooks
 
- -- Andrew Pollock <apollock at debian.org>  Sat, 27 Aug 2011 14:10:09 -0700
+ -- Andrew Pollock <apollock at debian.org>  Sat, 27 Aug 2011 22:20:52 -0700
 
 isc-dhcp (4.1.1-P1-18) unstable; urgency=low
 
diff --git a/debian/debug-enter b/debian/debug-enter
deleted file mode 100644
index 2bdd5fd..0000000
--- a/debian/debug-enter
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# The purpose of this script is just to show the variables that are
-# available to all the scripts in this directory. All these scripts
-# are called from /etc/dhcp3/dhclient-script, which exports all the
-# variables shown before. If you want to debug a problem with your DHCP
-# setup you can enable this script and take a look at
-# /tmp/dhclient-script.debug.
-
-# To enable this script set the following variable to "yes"
-RUN="no"
-
-if [ "$RUN" = "yes" ]; then
-	echo `date`: entering dhclient-enter-hooks.d, dumping variables. \
-		>> /tmp/dhclient-script.debug
-
-	# loop over the 4 possible prefixes: (empty), cur_, new_, old_
-	for prefix in '' 'cur_' 'new_' 'old_'; do
-		# loop over the DHCP variables passed to dhclient-script
-		for basevar in reason interface medium alias_ip_address \
-			       ip_address host_name network_number subnet_mask \
-			       broadcast_address routers static_routes \
-			       rfc3442_classless_static_routes \
-			       domain_name domain_search domain_name_servers \
-			       netbios_name_servers netbios_scope \
-			       ntp_servers \
-			       ip6_address ip6_prefix ip6_prefixlen \
-			       dhcp6_domain_search dhcp6_name_servers ; do
-			var="${prefix}${basevar}"
-
-			if [ -n "${!var}" ]; then
-				echo "$var='${!var}'" >> /tmp/dhclient-script.debug
-			fi
-		done
-	done
-
-	echo '--------------------------' >> /tmp/dhclient-script.debug
-fi
diff --git a/debian/debug-exit b/debian/debug-hook
similarity index 93%
rename from debian/debug-exit
rename to debian/debug-hook
index e16d204..efe9fc2 100644
--- a/debian/debug-exit
+++ b/debian/debug-hook
@@ -10,7 +10,7 @@
 RUN="no"
 
 if [ "$RUN" = "yes" ]; then
-	echo `date`: entering dhclient-exit-hooks.d, dumping variables. \
+	echo $(date): entering ${0%/*}, dumping variables. \
 		>> /tmp/dhclient-script.debug
 
 	# loop over the 4 possible prefixes: (empty), cur_, new_, old_
@@ -27,6 +27,7 @@ if [ "$RUN" = "yes" ]; then
 			       dhcp6_domain_search dhcp6_name_servers ; do
 			var="${prefix}${basevar}"
 
+			# show only variables with values set
 			if [ -n "${!var}" ]; then
 				echo "$var='${!var}'" >> /tmp/dhclient-script.debug
 			fi
diff --git a/debian/rules b/debian/rules
index e71ee2b..b6fb5f8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -121,8 +121,8 @@ install-stamp: build-stamp
 			$(DESTDIR)/usr/share/man/ja/man8; \
 	done
 
-	cp debian/debug-enter debian/isc-dhcp-client/etc/dhcp/dhclient-enter-hooks.d/debug
-	cp debian/debug-exit debian/isc-dhcp-client/etc/dhcp/dhclient-exit-hooks.d/debug
+	cp debian/debug-hook debian/isc-dhcp-client/etc/dhcp/dhclient-enter-hooks.d/debug
+	cp debian/debug-hook debian/isc-dhcp-client/etc/dhcp/dhclient-exit-hooks.d/debug
 
 	dh_install
 	dh_link -a

-- 
ISC DHCP packaging for Debian



More information about the pkg-dhcp-commits mailing list