Here's a cosmetically evolved patch which I'll commit and release
shortly. Thanks!
-- 
Thomas
diff --git a/etc/dhcp/dhclient-enter-hooks.d/resolvconf b/etc/dhcp/dhclient-enter-hooks.d/resolvconf
index 529504b..cf61615 100644
--- a/etc/dhcp/dhclient-enter-hooks.d/resolvconf
+++ b/etc/dhcp/dhclient-enter-hooks.d/resolvconf
@@ -45,27 +45,26 @@ if [ -x /sbin/resolvconf ] ; then
 		# It gets run later (or, in the TIMEOUT case, MAY get run later)
 		make_resolv_conf() {
 			local R
-			local nameserver
-			local zone_id
+			local N
+			local N_LOW
+			local ZONE_ID
 			R=""
 			if [ "$new_dhcp6_name_servers" ] && [ "$new_dhcp6_domain_search" ] ; then
 				R="${R}search $new_dhcp6_domain_search
 "
 			fi
-			shopt -s nocasematch
-			for nameserver in $new_dhcp6_name_servers ; do
-
+			for N in $new_dhcp6_name_servers ; do
 				# If the nameserver has a link-local address
 				# then add a zone ID (interface name) to it.
-				if  [[ "$nameserver" =~ ^fe80:: ]] ; then
-					zone_id="%$interface"
+				N_LOW="$(echo "$N" | tr '[:upper:]' '[:lower:]')"
+				if expr "$N_LOW" : ^fe80:: >/dev/null ; then
+					ZONE_ID="%$interface"
 				else
-					zone_id=""
+					ZONE_ID=""
 				fi
-				R="${R}nameserver $nameserver$zone_id
+				R="${R}nameserver $N$ZONE_ID
 "
 			done
-			shopt -u nocasematch
 			[ ! "$interface" ] || echo -n "$R" | /sbin/resolvconf -a "${interface}.ip6.dhclient"
 		}
 		;;

Reply via email to