dhclient-script: backport upstream changes

This commit is contained in:
Jiri Popelka 2011-07-01 15:04:42 +02:00
parent bb77af8b5e
commit 9b3b26027b

View File

@ -186,9 +186,19 @@ make_resolv_conf() {
echo "options ${RES_OPTIONS}" >> ${rscf}
fi
shopt -s nocasematch
for nameserver in ${new_dhcp6_name_servers} ; do
echo "nameserver ${nameserver}" >> ${rscf}
# If the nameserver has a link-local address
# add a <zone_id> (interface name) to it.
if [[ "$nameserver" =~ ^fe80:: ]]
then
zone_id="%${interface}"
else
zone_id=
fi
echo "nameserver ${nameserver}$zone_id" >> ${rscf}
done
shopt -u nocasematch
change_resolv_conf ${rscf}
rm -f ${rscf}