dhclient-script: backport upstream changes
This commit is contained in:
parent
bb77af8b5e
commit
9b3b26027b
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user