From 0a16b493cb7fe6f061fbe18c5c70296cd3e4a73f Mon Sep 17 00:00:00 2001 From: Eric Renfro Date: Thu, 1 Aug 2024 16:34:00 -0400 Subject: [PATCH] Fix debug for mkdir in /mnt --- gentoo-install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gentoo-install.sh b/gentoo-install.sh index 0004341..cdbf347 100755 --- a/gentoo-install.sh +++ b/gentoo-install.sh @@ -127,7 +127,8 @@ function create_subvolumes() { subvols+=("@swap") subvols+=("${!SUBVOLS_DEFAULT[@]}") - mkdir -p /mnt/btrfs + [[ ! -d /mnt/btrfs ]] && ${cmd} mkdir -p /mnt/btrfs + if [[ "$ENCRYPTION" ]]; then ${cmd} mount "/dev/mapper/luksvol" /mnt/btrfs else @@ -140,6 +141,7 @@ function create_subvolumes() { done ${cmd} umount /mnt/btrfs + ${cmd} rmdir /mnt/btrfs } function get_hibernate_size() { @@ -157,7 +159,7 @@ function prepare_target() { local cmd="" fi - ${cmd} mkdir /mnt/gentoo + [[ ! -d /mnt/gentoo ]] && ${cmd} mkdir /mnt/gentoo if [[ "$ENCRYPTION" ]]; then rootmount="/dev/mapper/luksvol"