Merge pull request #246746 from mode89/fix/nixos-install-with-non-empty-mnt

nixos-install: fix removal of non-empty `/mnt`
This commit is contained in:
Pol Dellaiera 2023-08-02 18:41:46 +02:00 committed by GitHub
commit 17b46c61f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -206,7 +206,7 @@ if [[ -z $noBootLoader ]]; then
mount --rbind --mkdir / "$mountPoint"
mount --make-rslave "$mountPoint"
/run/current-system/bin/switch-to-configuration boot
umount -R "$mountPoint" && rmdir "$mountPoint"
umount -R "$mountPoint" && (rmdir "$mountPoint" 2>/dev/null || true)
EOF
)"
fi