Fix: missing boot partition type being passed to part_auto()

This commit is contained in:
natemaia 2019-11-02 18:49:31 -07:00
parent 071e2fe55d
commit d326b0fbf4

View File

@ -8,7 +8,7 @@
# check for syntax errors
# set -n
VER=2.1.4
VER=2.1.5
# default values {
@ -586,7 +586,7 @@ part_menu()
elif [[ $choice == 'shrink' ]]; then
part_shrink "$device"
elif [[ $choice == 'auto' ]]; then
local root_size txt label boot_fs
local root_size txt label boot_fs boot_type
root_size=$(lsblk -lno SIZE "$device" | awk 'NR == 1 {if ($1 ~ "G") {sub(/G/, ""); print ($1 * 1000 - 512) / 1000 "G"} else {sub(/M/, ""); print ($1 - 512) "M"}}')
txt="\nWARNING:\n\nALL data on $device will be destroyed and the following partitions will be created\n\n- "
if [[ $SYS == 'BIOS' ]]; then
@ -597,7 +597,7 @@ part_menu()
txt+="A $boot_fs efi boot partition (512M)\n- "
fi
txt+="An ext4 partition using all remaining space ($root_size)\n\nDo you want to continue?\n"
yesno "Auto Partition" "$txt" && part_auto "$device" "$label" "$boot_fs" "$root_size"
yesno "Auto Partition" "$txt" && part_auto "$device" "$label" "$boot_fs" "$root_size" "$boot_type"
else
clear
tput cnorm