Added possibility to choose the partitioning software

This commit is contained in:
toluschr 2019-09-04 14:54:02 +02:00 committed by Juan RP
parent 2ca28459d7
commit 95e305c461

View File

@ -485,8 +485,15 @@ menu_partitions() {
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
local device=$(cat $ANSWER) local device=$(cat $ANSWER)
DIALOG --title "Modify Partition Table on $device" --msgbox "\n DIALOG --title " Select the software for partitioning " \
${BOLD}cfdisk will be executed in disk $device.${RESET}\n\n --menu "$MENULABEL" ${MENUSIZE} \
"cfdisk" "Easy to use" \
"fdisk" "More advanced"
if [ $? -eq 0 ]; then
local software=$(cat $ANSWER)
DIALOG --title "Modify Partition Table on $device" --msgbox "\n
${BOLD}${software} will be executed in disk $device.${RESET}\n\n
For BIOS systems, MBR or GPT partition tables are supported.\n For BIOS systems, MBR or GPT partition tables are supported.\n
To use GPT on PC BIOS systems an empty partition of 1MB must be added\n To use GPT on PC BIOS systems an empty partition of 1MB must be added\n
at the first 2GB of the disk with the TOGGLE \`bios_grub' enabled.\n at the first 2GB of the disk with the TOGGLE \`bios_grub' enabled.\n
@ -498,13 +505,14 @@ At least 1 partition is required for the rootfs (/).\n
For swap, RAM*2 must be really enough. For / 600MB are required.\n\n For swap, RAM*2 must be really enough. For / 600MB are required.\n\n
${BOLD}WARNING: /usr is not supported as a separate partition.${RESET}\n ${BOLD}WARNING: /usr is not supported as a separate partition.${RESET}\n
${RESET}\n" 18 80 ${RESET}\n" 18 80
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
while true; do while true; do
clear; cfdisk $device; PARTITIONS_DONE=1 clear; $software $device; PARTITIONS_DONE=1
break break
done done
else else
return return
fi
fi fi
fi fi
} }