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

Andrew Pollock apollock at debian.org
Thu Aug 25 06:19:41 UTC 2011


The following commit has been merged in the master branch:
commit 4a2456e90fafbf8dc14ebc746af8e5c5e33ee4cb
Author: Andrew Pollock <apollock at debian.org>
Date:   Wed Aug 24 23:17:58 2011 -0700

    rfc3442-classless-routes: split by OS and convert to iproute2
    
    * split rfc3442-classless-routes into a variant for kfreebsd & linux
    * convert the linux variant to iproute2
    * update rules to install the correct variant per OS
    
    Patch from Peter Marschall

diff --git a/debian/changelog b/debian/changelog
index 416df2b..c1cb3e7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,8 +12,11 @@ isc-dhcp (4.2.2-1) unstable; urgency=low
     dhclient-script support stateless DHCPv6 (closes: #632888) 
   * debian/dhclient-script.linux: fix regression for MTU <= 576 handling
     (closes: #638267)
+  * Apply patch from Peter Marschall to split the rfc3442-classless-routes hook
+    into a Linux and a kFreeBSD variant, so that the Linux one can use iproute
+    (closes: #630519)
 
- -- Andrew Pollock <apollock at debian.org>  Wed, 24 Aug 2011 22:25:25 -0700
+ -- Andrew Pollock <apollock at debian.org>  Wed, 24 Aug 2011 23:16:09 -0700
 
 isc-dhcp (4.1.1-P1-18) unstable; urgency=low
 
diff --git a/debian/rfc3442-classless-routes b/debian/rfc3442-classless-routes.kfreebsd
similarity index 90%
copy from debian/rfc3442-classless-routes
copy to debian/rfc3442-classless-routes.kfreebsd
index e70db30..6e14946 100644
--- a/debian/rfc3442-classless-routes
+++ b/debian/rfc3442-classless-routes.kfreebsd
@@ -49,9 +49,9 @@ if [ "$RUN" = "yes" ]; then
 				esac
 
 				if [ "$net_length" -eq 32 ]; then
-					ip -4 route add "${net_address}" via "${gateway}"
+					/sbin/route add -host "${net_address}" gw "${gateway}"
 				else
-					ip -4 route add "${net_address}/${net_length}" via "${gateway}"
+					/sbin/route add -net "${net_address}/${net_length}" gw "${gateway}"
 				fi
 			done
 		fi
diff --git a/debian/rfc3442-classless-routes b/debian/rfc3442-classless-routes.linux
similarity index 87%
rename from debian/rfc3442-classless-routes
rename to debian/rfc3442-classless-routes.linux
index e70db30..18ce0c3 100644
--- a/debian/rfc3442-classless-routes
+++ b/debian/rfc3442-classless-routes.linux
@@ -48,11 +48,9 @@ if [ "$RUN" = "yes" ]; then
 						;;
 				esac
 
-				if [ "$net_length" -eq 32 ]; then
-					ip -4 route add "${net_address}" via "${gateway}"
-				else
-					ip -4 route add "${net_address}/${net_length}" via "${gateway}"
-				fi
+				# set route (ip detects host routes automatically)
+				ip -4 route add "${net_address}/${net_length}" \
+					via "${gateway}" dev "${interface}" >/dev/null 2>&1
 			done
 		fi
 	fi
diff --git a/debian/rules b/debian/rules
index 0a454eb..e71ee2b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -123,12 +123,13 @@ install-stamp: build-stamp
 
 	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/rfc3442-classless-routes debian/isc-dhcp-client/etc/dhcp/dhclient-exit-hooks.d
 
 	dh_install
 	dh_link -a
 
 	cp debian/dhclient-script.$(DEB_HOST_ARCH_OS) `pwd`/debian/isc-dhcp-client/sbin/dhclient-script
+	cp debian/rfc3442-classless-routes.$(DEB_HOST_ARCH_OS) \
+		`pwd`/debian/isc-dhcp-client/etc/dhcp/dhclient-exit-hooks.d/rfc3442-classless-routes
 
 	# Install Linux specific documentation
 ifeq ($(DEB_HOST_ARCH_OS), linux)

-- 
ISC DHCP packaging for Debian



More information about the pkg-dhcp-commits mailing list