From 4c6e8e92840d11790c2d308330b928eadf308343 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 20 Sep 2020 09:42:19 +0000 Subject: [PATCH] Go back to unmounting resolv.conf but prevent path canonicalisation --- cookbooks/networking/recipes/default.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 = {} -- 2.43.2