aboutsummaryrefslogtreecommitdiffstats
path: root/main/dhcp/dhclient-script.patch
blob: c799a94ac4025246c20e3e63a01c8417eb9173a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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