Re: Can't find the DNS Servers
On Mon, 25 Sep 2017, Greg Wooledge wrote:
> Should the dhclient program have a CONFIG FILE OPTION to say
> "NEVER TOUCH THE resolv.conf FILE"? YES!
>
> Does it? NO!
It does. Simply:
cat - <<EOF > /etc/dhcp/dhclient-enter-hooks.d/disablemakeresolvconf
make_resolv_conf() { : ; }
EOF
as is documented in dhclient-script(8):
When it starts, the client script first defines a shell function,
make_resolv_conf , which is later used to create the
/etc/resolv.conf file. To override the default behaviour,
redefine this function in the enter hook script.
--
Don Armstrong https://www.donarmstrong.com
An elephant: A mouse built to government specifications.
-- Robert Heinlein _Time Enough For Love_ p244
Reply to: