dhclient-script: make_resolv_conf(): keep old nameservers
if server sends domain-name/search, but no nameservers (#1269595)
This commit is contained in:
parent
15e5415130
commit
609ced7095
@ -129,9 +129,13 @@ make_resolv_conf() {
|
|||||||
echo "options ${RES_OPTIONS}" >> "${rscf}"
|
echo "options ${RES_OPTIONS}" >> "${rscf}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "${new_domain_name_servers}" ]; then
|
||||||
for nameserver in ${new_domain_name_servers} ; do
|
for nameserver in ${new_domain_name_servers} ; do
|
||||||
echo "nameserver ${nameserver}" >> "${rscf}"
|
echo "nameserver ${nameserver}" >> "${rscf}"
|
||||||
done
|
done
|
||||||
|
else # keep 'old' nameservers
|
||||||
|
sed -n /^\w*[Nn][Aa][Mm][Ee][Ss][Ee][Rr][Vv][Ee][Rr]/p "${RESOLVCONF}" >> "${rscf}"
|
||||||
|
fi
|
||||||
|
|
||||||
change_resolv_conf "${rscf}"
|
change_resolv_conf "${rscf}"
|
||||||
rm -f "${rscf}"
|
rm -f "${rscf}"
|
||||||
@ -162,6 +166,7 @@ make_resolv_conf() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
shopt -s nocasematch
|
shopt -s nocasematch
|
||||||
|
if [ -n "${new_dhcp6_name_servers}" ]; then
|
||||||
for nameserver in ${new_dhcp6_name_servers} ; do
|
for nameserver in ${new_dhcp6_name_servers} ; do
|
||||||
# If the nameserver has a link-local address
|
# If the nameserver has a link-local address
|
||||||
# add a <zone_id> (interface name) to it.
|
# add a <zone_id> (interface name) to it.
|
||||||
@ -173,6 +178,9 @@ make_resolv_conf() {
|
|||||||
fi
|
fi
|
||||||
echo "nameserver ${nameserver}$zone_id" >> "${rscf}"
|
echo "nameserver ${nameserver}$zone_id" >> "${rscf}"
|
||||||
done
|
done
|
||||||
|
else # keep 'old' nameservers
|
||||||
|
sed -n /^\w*[Nn][Aa][Mm][Ee][Ss][Ee][Rr][Vv][Ee][Rr]/p "${RESOLVCONF}" >> "${rscf}"
|
||||||
|
fi
|
||||||
shopt -u nocasematch
|
shopt -u nocasematch
|
||||||
|
|
||||||
change_resolv_conf "${rscf}"
|
change_resolv_conf "${rscf}"
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
Summary: Dynamic host configuration protocol software
|
Summary: Dynamic host configuration protocol software
|
||||||
Name: dhcp
|
Name: dhcp
|
||||||
Version: 4.3.3
|
Version: 4.3.3
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
||||||
# dcantrell maintaining the package) made incorrect use of the epoch and
|
# dcantrell maintaining the package) made incorrect use of the epoch and
|
||||||
# that's why it is at 12 now. It should have never been used, but it was.
|
# that's why it is at 12 now. It should have never been used, but it was.
|
||||||
@ -663,6 +663,10 @@ done
|
|||||||
%doc doc/html/
|
%doc doc/html/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Oct 13 2015 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.3-4
|
||||||
|
- dhclient-script: make_resolv_conf(): keep old nameservers
|
||||||
|
if server sends domain-name/search, but no nameservers (#1269595)
|
||||||
|
|
||||||
* Tue Sep 22 2015 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.3-3
|
* Tue Sep 22 2015 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.3-3
|
||||||
- dhclient: make sure link-local address is ready in stateless mode (#1263466)
|
- dhclient: make sure link-local address is ready in stateless mode (#1263466)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user