mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04:00
Fix dhclient infinite loop on ro /etc/resolv.conf
Submitted by: C J Michaels <cjm2@earthling.net> Reviewed by: David W. Hankins PR: 38778 ISC-Bug: 5754
This commit is contained in:
parent
61860dd771
commit
565f17391d
1 changed files with 11 additions and 5 deletions
|
|
@ -13,13 +13,19 @@ fi
|
|||
make_resolv_conf() {
|
||||
if [ x"$new_domain_name_servers" != x ]; then
|
||||
if [ "x$new_domain_name" != x ]; then
|
||||
echo search $new_domain_name >/etc/resolv.conf
|
||||
( echo search $new_domain_name >/etc/resolv.conf )
|
||||
exit_status=$?
|
||||
else
|
||||
rm /etc/resolv.conf
|
||||
( rm /etc/resolv.conf )
|
||||
exit_status=$?
|
||||
fi
|
||||
if [ $exit_status -ne 0 ]; then
|
||||
$LOGGER "WARNING: Unable to update resolv.conf: Error $exit_status"
|
||||
else
|
||||
for nameserver in $new_domain_name_servers; do
|
||||
( echo nameserver $nameserver >>/etc/resolv.conf )
|
||||
done
|
||||
fi
|
||||
for nameserver in $new_domain_name_servers; do
|
||||
echo nameserver $nameserver >>/etc/resolv.conf
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue