assign partition variables

This commit is contained in:
pixrobot 2024-04-02 20:56:19 +01:00
parent 3d98bf272c
commit f5c20d724e
1 changed files with 11 additions and 0 deletions

View File

@ -47,6 +47,17 @@ insmod /root/vfat-modules/vfat.ko.zst
dialog --title "Welcome" --msgbox "Welcome to the EvolutionOS installer! \n\nThis installer is meant to be straightforward, no need for technical skill. \n\nPress enter to select buttons, tab to move between text boxes, and left / right to move between buttons." 0 0
choice=$(dialog --menu "Select an installation drive:" 20 60 10 $(create_menu $(parted -l | grep -oE '^Disk /dev/[a-zA-Z0-9]+' | cut -d' ' -f2- | cut -c 6-)) 2>&1 >/dev/tty)
if [[ ${choice} =~ "nvme" ]]; then
part1="p1"
part2="p2"
elif [[ ${choice} =~ "mmcblk" ]]; then
part1="p1"
part2="p2"
else
part1="1"
part2="2"
fi
if [[ "$(cat /sys/block/${choice}/ro)" = "1" ]]; then
dialog --title "Scan disk" --msgbox "You are not able to install evolutionOS on a non-writable disk" 0 0
failinstall