If the dhcpd server doesn't provide a domain name or dns servers then
don't clobber /etc/resolv.conf Add $FreeBSD. Submitted by: an j. peterson" <rbw@myplace.org> Verified fix in: dhcp-3.0.1rc6 PR: misc/34455
This commit is contained in:
parent
770d331306
commit
ff7190ffa5
@ -35,6 +35,7 @@
|
|||||||
#############################################################################
|
#############################################################################
|
||||||
# $MindStep_Id: dhclient-script.sh,v 1.8 1999/12/07 22:11:08 patrick Exp $
|
# $MindStep_Id: dhclient-script.sh,v 1.8 1999/12/07 22:11:08 patrick Exp $
|
||||||
# $MindStep_Tag: CONTRIB_19991207 $
|
# $MindStep_Tag: CONTRIB_19991207 $
|
||||||
|
# $FreeBSD$
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
|
|
||||||
@ -82,10 +83,12 @@ post_state_TIMEOUT_hook () { }
|
|||||||
#############################################################################
|
#############################################################################
|
||||||
make_resolv_conf ()
|
make_resolv_conf ()
|
||||||
{
|
{
|
||||||
echo search $new_domain_name >/etc/resolv.conf
|
if [ "x$new_domain_name" != x ] && [ "x$new_domain_name_servers" != x ]; then
|
||||||
for nameserver in $new_domain_name_servers; do
|
echo search $new_domain_name >/etc/resolv.conf
|
||||||
echo nameserver $nameserver >>/etc/resolv.conf
|
for nameserver in $new_domain_name_servers; do
|
||||||
done
|
echo nameserver $nameserver >>/etc/resolv.conf
|
||||||
|
done
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
|
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
|
||||||
|
Loading…
Reference in New Issue
Block a user