Web lists-archives.com

Re: Can't find the DNS Servers




On Wed, Oct 04, 2017 at 08:55:51AM -0400, Michael Stone wrote:
> If you are not using resolvconf, a reliable way to stop the isc dhcp client
> from updating resolv.conf is to create
> /etc/dhcp/dhclient-enter-hooks.d/xlocal-nodnsupdate containing
> 
> #!/bin/sh
> make_resolv_conf(){ :; }

You don't need the shebang.  These are dotted in, not executed.

> This overrides the default function. Make sure that file is executable
> (chmod +x /etc/dhcp/dhclient-enter-hooks.d/xlocal-nodnsupdate)

... oh shit, you DO need to set the stupid execute bit, at least
according to dhclient-script(8).

Now I've gotta go run a bunch of chmod commands on all these machines.
To set a bit on a file that is simply read, and should not need an
execute bit.  And I had thought I was done.  *sigh*