]> git.openstreetmap.org Git - chef.git/commitdiff
Go back to unmounting resolv.conf but prevent path canonicalisation
authorTom Hughes <tom@compton.nu>
Sun, 20 Sep 2020 09:42:19 +0000 (09:42 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 20 Sep 2020 09:42:19 +0000 (09:42 +0000)
cookbooks/networking/recipes/default.rb

index fa3f97d00f6a6230416101d88a0f230c3c1119d6..9281aa3915ff1e73f3ecacaf16e908bbdf407204 100644 (file)
@@ -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 = {}