Fix: issue when entering mount menu

This commit is contained in:
natemaia 2019-08-18 14:00:42 -07:00
parent 27eb375570
commit b3d7803cf0

View File

@ -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
}