From b57e7522209c8bdff6e0970d0fc4a7ec92ea50fe Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 7 Aug 2023 20:17:41 +0200 Subject: [PATCH] mkosi: Unmount /etc/resolv.conf if it's a mountpoint --- mkosi.presets/20-final/mkosi.postinst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mkosi.presets/20-final/mkosi.postinst b/mkosi.presets/20-final/mkosi.postinst index 3f3a78e906..663fa5c762 100755 --- a/mkosi.presets/20-final/mkosi.postinst +++ b/mkosi.presets/20-final/mkosi.postinst @@ -76,7 +76,9 @@ if command -v authselect >/dev/null; then fi fi -# Let tmpfiles.d/systemd-resolve.conf handle the symlink +# Let tmpfiles.d/systemd-resolve.conf handle the symlink. /etc/resolv.conf might be mounted over so undo that +# if that's the case. +mountpoint -q /etc/resolv.conf && umount /etc/resolv.conf rm -f /etc/resolv.conf . /usr/lib/os-release -- 2.25.1