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