Hi, everybody here.
El Tue, 18 Mar 2025 16:44:03 -0300
altoid via Dng <dng@???> escribió:
> Then, while searching on how to fix something else, I came across
> [/sbin/dhclient-script] and within it, this bit which instantly
> called my attention:
>
> [code]
> --- snip ---
> # update /etc/resolv.conf based on received values # <---- wthf?
> make_resolv_conf() {
> local new_resolv_conf
> --- snip ---
> [/code]
>
> Not in any way script savvy but it seemed I had found the hijacker,
> so to speak.
>
> Those who know more could confirm my suspicions.
Take a look at the manual page for dhclient-script(5)
I have this script at /etc/dhcp/dhclient-enter-hooks.d/no_dns_update
(any name will do) that overrides the make_resolv_conf function that
you don't like:
--- start
#!/bin/sh
# prevent dhclient from updating /etc/resolv.conf
make_resolv_conf() { : ; }
--- end
I suppose this works, althought I have set /etc/resolv.conf immutable anyway
because over the years I have found LOTS of programs destroying my
settings :-)
Hope it helps.
Salo.
--
Gonzalo Pérez de Olaguer Córdoba salo@???
-=- buscando empleo desde 1988 -=- www.gpoc.es
PGP: A295 8043 4DD4 EE9E 2BD3 DE84 D41A B9F4 6B7A 0049