Skip to content

Commit 95e305c

Browse files
toluschrJuan RP
authored andcommitted
Added possibility to choose the partitioning software
1 parent 2ca2845 commit 95e305c

1 file changed

Lines changed: 17 additions & 9 deletions

File tree

installer.sh.in

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,15 @@ menu_partitions() {
485485
if [ $? -eq 0 ]; then
486486
local device=$(cat $ANSWER)
487487

488-
DIALOG --title "Modify Partition Table on $device" --msgbox "\n
489-
${BOLD}cfdisk will be executed in disk $device.${RESET}\n\n
488+
DIALOG --title " Select the software for partitioning " \
489+
--menu "$MENULABEL" ${MENUSIZE} \
490+
"cfdisk" "Easy to use" \
491+
"fdisk" "More advanced"
492+
if [ $? -eq 0 ]; then
493+
local software=$(cat $ANSWER)
494+
495+
DIALOG --title "Modify Partition Table on $device" --msgbox "\n
496+
${BOLD}${software} will be executed in disk $device.${RESET}\n\n
490497
For BIOS systems, MBR or GPT partition tables are supported.\n
491498
To use GPT on PC BIOS systems an empty partition of 1MB must be added\n
492499
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
498505
For swap, RAM*2 must be really enough. For / 600MB are required.\n\n
499506
${BOLD}WARNING: /usr is not supported as a separate partition.${RESET}\n
500507
${RESET}\n" 18 80
501-
if [ $? -eq 0 ]; then
502-
while true; do
503-
clear; cfdisk $device; PARTITIONS_DONE=1
504-
break
505-
done
506-
else
507-
return
508+
if [ $? -eq 0 ]; then
509+
while true; do
510+
clear; $software $device; PARTITIONS_DONE=1
511+
break
512+
done
513+
else
514+
return
515+
fi
508516
fi
509517
fi
510518
}

0 commit comments

Comments
 (0)