--- 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 (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