darwin-install: fix already-mounted store volumes
This adds an explicit unmount of the store volume to avoid cases where the installer can hang in await_volume when: - the user already has a store volume - that volume is already mounted somewhere other than /nix - they do not take a path through the installer that results in an explicit unmount (as both removing and encrypting the volume would do)
This commit is contained in:
parent
c4bd6a15c2
commit
abdf9f2a6e
1 changed files with 3 additions and 0 deletions
|
@ -742,6 +742,9 @@ setup_volume() {
|
|||
|
||||
use_special="${NIX_VOLUME_USE_SPECIAL:-$(create_volume)}"
|
||||
|
||||
_sudo "to ensure the Nix volume is not mounted" \
|
||||
/usr/sbin/diskutil unmount force "$use_special" || true # might not be mounted
|
||||
|
||||
use_uuid=${NIX_VOLUME_USE_UUID:-$(volume_uuid_from_special "$use_special")}
|
||||
|
||||
setup_fstab "$use_uuid"
|
||||
|
|
Loading…
Reference in a new issue