diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-08-07 20:17:41 +0200 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2023-08-07 21:56:55 +0200 |
commit | b57e7522209c8bdff6e0970d0fc4a7ec92ea50fe (patch) | |
tree | 9350268262ce47478ecba8dce89782671d158b27 /mkosi.presets/20-final | |
parent | ci(lint): exclude `.in` files from ShellCheck lint (diff) | |
download | systemd-b57e7522209c8bdff6e0970d0fc4a7ec92ea50fe.tar.xz systemd-b57e7522209c8bdff6e0970d0fc4a7ec92ea50fe.zip |
mkosi: Unmount /etc/resolv.conf if it's a mountpoint
Diffstat (limited to 'mkosi.presets/20-final')
-rwxr-xr-x | mkosi.presets/20-final/mkosi.postinst | 4 |
1 files changed, 3 insertions, 1 deletions
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 |