diff --git a/archlabs-installer b/archlabs-installer index 05e1775..bdc2e30 100755 --- a/archlabs-installer +++ b/archlabs-installer @@ -1206,7 +1206,7 @@ select_efi_partition() size_t="${size: -1:1}" # size type eg. K, M, G, T isize=${size:0:-1} # remove trailing size type character isize=${isize%.*} # remove any decimal (round down) - [[ $size_t =~ [KT] || ($size_t == 'G' && $isize -gt 2) || ($size_t == 'M' && $isize -lt 100) ]] || { pts+=$'\n'"$dev $size"; (( ptcount++ )); } + [[ $size_t =~ [KT] || ($size_t == 'G' && $isize -gt 2) || ($size_t == 'M' && $isize -lt 100) ]] || { pts+="$dev $size "; (( ptcount++ )); } done <<< "$PARTS" if [[ $AUTO_BOOT_PART ]]; then @@ -1240,7 +1240,7 @@ select_boot_partition() size_t="${size: -1:1}" # size type eg. K, M, G, T isize=${size:0:-1} # remove trailing size type character isize=${isize%.*} # remove any decimal (round down) - [[ $size_t =~ [KT] || ($size_t == 'G' && $isize -gt 2) || ($size_t == 'M' && $isize -lt 100) ]] || { pts+=$'\n'"$dev $size"; (( ptcount++ )); } + [[ $size_t =~ [KT] || ($size_t == 'G' && $isize -gt 2) || ($size_t == 'M' && $isize -lt 100) ]] || { pts+="$dev $size "; (( ptcount++ )); } done <<< "$PARTS" if [[ $AUTO_BOOT_PART && ! $LVM ]]; then @@ -1273,7 +1273,7 @@ select_root_partition() size_t="${size: -1:1}" # size type eg. K, M, G, T isize=${size:0:-1} # remove trailing size type character isize=${isize%.*} # remove any decimal (round down) - [[ $size_t =~ [MK] || ($size_t == 'G' && $isize -lt 4) ]] || { pts+=$'\n'"$dev $size"; (( ptcount++ )); } + [[ $size_t =~ [MK] || ($size_t == 'G' && $isize -lt 4) ]] || { pts+="$dev $size "; (( ptcount++ )); } done <<< "$PARTS" if [[ $AUTO_ROOT_PART && -z $LVM && -z $LUKS ]]; then @@ -1299,7 +1299,7 @@ select_extra_partitions() # walk partition list and skip ones that are too small to be usable while read -r dev size; do - [[ ${size: -1:1} =~ [KM] ]] || { pts+=$'\n'"$dev $size"; (( ptcount++ )); } + [[ ${size: -1:1} =~ [KM] ]] || { pts+="$dev $size "; (( ptcount++ )); } done <<< "$PARTS" while (( ptcount > 0 )); do @@ -2537,7 +2537,7 @@ umount_dir() { mount | grep -q 'swap' && swapoff -a for dir; do - [[ -d $dir ]] || continue + [[ -d $dir && "$(mount | grep "on $dir ")" ]] || continue umount "$dir" 2>/dev/null || { sleep 0.5; umount -f "$dir" 2>/dev/null || umount -l "$dir"; } done }