From: Tom Hughes Date: Sun, 20 Sep 2020 09:42:19 +0000 (+0000) Subject: Go back to unmounting resolv.conf but prevent path canonicalisation X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/4c6e8e92840d11790c2d308330b928eadf308343 Go back to unmounting resolv.conf but prevent path canonicalisation --- diff --git a/cookbooks/networking/recipes/default.rb b/cookbooks/networking/recipes/default.rb index fa3f97d00..9281aa391 100644 --- a/cookbooks/networking/recipes/default.rb +++ b/cookbooks/networking/recipes/default.rb @@ -342,9 +342,14 @@ template "/etc/systemd/resolved.conf.d/99-chef.conf" do notifies :restart, "service[systemd-resolved]", :immediately end +if node[:filesystem][:by_mountpoint][:"/etc/resolv.conf"] + execute "umount-resolve-conf" do + command "umount -c /etc/resolv.conf" + end +end + link "/etc/resolv.conf" do to "../run/systemd/resolve/stub-resolv.conf" - not_if { ENV["TEST_KITCHEN"] } end zones = {}