Skip to content

Commit

Permalink
setup-disk: fix automatic LVM with swap behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Takoda authored and ncopa committed Nov 19, 2024
1 parent de95a05 commit ef5f3a9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions setup-disk.in
Original file line number Diff line number Diff line change
Expand Up @@ -1598,6 +1598,10 @@ else
done
fi

if [ -z "$SWAP_SIZE" ]; then
SWAP_SIZE=$(find_swap_size $diskdevs)
fi

if [ -n "$diskdevs" ] && [ -z "$DISK_MODE" ]; then
resp=
disk_is_or_disks_are="disk is"
Expand Down Expand Up @@ -1626,7 +1630,7 @@ if [ -n "$diskdevs" ] && [ -z "$DISK_MODE" ]; then
nolvm) USE_LVM="";;
crypt)
USE_CRYPT="_crypt"
if [ -n "$SWAP_SIZE" ]; then
if [ "$SWAP_SIZE" -gt 0 ]; then
USE_LVM="_lvm"
fi
;;
Expand All @@ -1639,7 +1643,7 @@ if [ -n "$diskdevs" ] && [ -z "$DISK_MODE" ]; then
cryptsys)
resp=${resp#crypt}
USE_CRYPT="_crypt"
if [ -n "$SWAP_SIZE" ]; then
if [ "$SWAP_SIZE" -gt 0 ]; then
USE_LVM="_lvm"
fi
break
Expand All @@ -1649,10 +1653,6 @@ if [ -n "$diskdevs" ] && [ -z "$DISK_MODE" ]; then
DISK_MODE="$resp"
fi

if [ -z "$SWAP_SIZE" ]; then
SWAP_SIZE=$(find_swap_size $diskdevs)
fi

if [ -n "$USE_EFI" ] && [ -z "$USE_CRYPT" ] && [ -z "$BOOT_SIZE" ]; then
BOOT_SIZE=$(find_efi_size $diskdevs)
fi
Expand Down

0 comments on commit ef5f3a9

Please sign in to comment.