aboutsummaryrefslogtreecommitdiffstats
path: root/main/dhcp/dhclient-script.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/dhcp/dhclient-script.patch')
-rw-r--r--main/dhcp/dhclient-script.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/main/dhcp/dhclient-script.patch b/main/dhcp/dhclient-script.patch
new file mode 100644
index 0000000000..c799a94ac4
--- /dev/null
+++ b/main/dhcp/dhclient-script.patch
@@ -0,0 +1,30 @@
+--- a/client/scripts/linux
++++ b/client/scripts/linux
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ # dhclient-script for Linux. Dan Halbert, March, 1997.
+ # Updated for Linux 2.[12] by Brian J. Murrell, January 1999.
+ # No guarantees about this. I'm a novice at the details of Linux
+@@ -49,11 +49,11 @@
+ if [ "x${new_dhcp6_domain_search}" != x ] ; then
+ echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
+ fi
+- shopt -s nocasematch
+ for nameserver in ${new_dhcp6_name_servers} ; do
+ # If the nameserver has a link-local address
+ # add a <zone_id> (interface name) to it.
+- if [[ "$nameserver" =~ ^fe80:: ]]
++ echo $nameserver | tr '[:upper:]' '[:lower:]' | grep -E ^fe80:: > /dev/null
++ if [ $? -eq 0 ]
+ then
+ zone_id="%$interface"
+ else
+@@ -61,7 +61,6 @@
+ fi
+ echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6
+ done
+- shopt -u nocasematch
+
+ mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
+ fi