From 9831f1b1839d0eb66981a12a4a24bc3e78edae86 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 10 Apr 2021 23:01:11 -0700 Subject: [PATCH] net/dns: also include 'tail' and 'base' files when fixing up resolv.conf. Signed-off-by: David Anderson --- net/dns/resolvconf-workaround.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/net/dns/resolvconf-workaround.sh b/net/dns/resolvconf-workaround.sh index 5f8ef223d..f6f2690e2 100644 --- a/net/dns/resolvconf-workaround.sh +++ b/net/dns/resolvconf-workaround.sh @@ -46,6 +46,14 @@ fi fi echo "# Tailscale workaround applied to set exclusive DNS configuration." cat tun-tailscale.inet + if [ -f /etc/resolvconf/resolv.conf.d/base ]; then + # Keep options and sortlist, discard other base things since + # they're the things we're trying to override. + grep -e 'sortlist ' -e 'options ' /etc/resolvconf/resolv.conf.d/base || true + fi + if [ -f /etc/resolvconf/resolv.conf.d/tail ]; then + cat /etc/resolvconf/resolv.conf.d/tail + fi ) >/etc/resolv.conf if [ -d /etc/resolvconf/update-libc.d ] ; then