All network managers/stacks I know (including dhcpcd
) can work pretty well without resolvconf
and then do edit /etc/resolv.conf
directly instead. Basically, if you do not actively use the features that resolvconf
allows, like setting a fixed default and/or a fallback nameserver entry, local domain/search entries etc, which you want to stay even when e.g. the DHCP client provides different info, then resolvconf
is usually not required. Especially when using the system as server with a then static/reserved IP, you most likely do not want nameservers to change at all. And if there is really any package depending on resolvconf
, then apt
will warn you and allow you to confirm or abort.
But indeed as a general recommendation, as we cannot know users individual systems and people come here and copy&paste commands they may not fully understand, in the other thread I suggested to replace the openresolv
with the resolvconf
package, both providing the same core feature ( resolvconf
command), but the resolvconf
package without the harmful magic around:
if dpkg-query -s 'openresolv' &> /dev/null
then
apt -y install resolvconf
apt -y purge openresolv
rm -f /etc/unbound/unbound.conf.d/resolvconf_resolvers.conf
fi
@deHakkelaar
Do you think such would be feasible for: unbound - Pi-hole documentation
All Raspberry Pi OS Bullseye users have this issue OOTB now. Not sure how much details make sense, all three solutions (purge package, replace package, comment setting) or, to not confuse readers, only one that we find most compatible?
Lets continue here.
Yeah most users wont even notice this setting effecting how unbound
resolves either as a dump dumb caching forwarder or as a recursive resolver.
But I prefer to comment/hash out the unwanted config instead of removing and installing packages because you never know if the system depends on openresolv
in some other way.
Something like:
sudo sed -i 's\^unbound_conf=\#unbound_conf=\g' /etc/resolvconf.conf
sudo rm /etc/unbound/unbound.conf.d/resolvconf_resolvers.conf
sudo service unbound restart
1 Like