fix setup system

This commit is contained in:
rootzoll
2025-01-16 21:22:52 +01:00
parent 78ad01dfe8
commit b7a5c697c6

View File

@@ -276,7 +276,7 @@ if [ "$action" = "status" ]; then
else
# system might run from SD card
bootFromStorage=0
# check if boot partition is on SD card (mmcblk)
# check if boot partition is on SD card (mmcblk) - staus quo, might change thru proposed layout
bootFromSD=$(lsblk | grep mmcblk | grep -c /boot)
fi
@@ -500,14 +500,10 @@ if [ "$action" = "status" ]; then
elif [ ${#storageMountedPath} -gt 0 ] && [ ${#dataMountedPath} -gt 0 ] && [ ${#systemMountedPath} -gt 0 ]; then
scenario="ready"
# ready: RaspberryPi+BootNVMe, Laptop or VM with patched thru USB drive
# ready: RaspberryPi, Laptop or VM with patched thru USB drive
elif [ ${#storageMountedPath} -gt 0 ] && [ ${combinedDataStorage} -eq 1 ]; then
scenario="ready"
# ready: Old RaspberryPi
elif [ ${#storageMountedPath} -gt 0 ] && [ ${combinedDataStorage} -eq 1 ] && [ ${bootFromSD} -eq 1 ] ; then
scenario="ready"
# recover: drives there but unmounted & blitz config exists (check raspiblitz.conf with -inspect if its update)
elif [ ${#storageDevice} -gt 0 ] && [ ${#storageMountedPath} -eq 0 ] && [ ${dataConfigFound} -eq 1 ] && [ "${systemMountedPath}" != "/" ] && [ ${bootFromSD} -eq 0 ]; then
scenario="recover:system" # auto update system before recover
@@ -517,7 +513,7 @@ if [ "$action" = "status" ]; then
scenario="recover"
# setup: drives there but unmounted & no blitz config exists & booted from install media
elif [ ${#storageDevice} -gt 0 ] && [ ${#storageMountedPath} -eq 0 ] && [ ${dataConfigFound} -eq 0 ] && [ "${systemMountedPath}" != "/" ]; then
elif [ ${#storageDevice} -gt 0 ] && [ ${#storageMountedPath} -eq 0 ] && [ ${dataConfigFound} -eq 0 ] && [ "${systemMountedPath}" != "/" ] && [ ${bootFromSD} -eq 0 ]; then
scenario="setup:system" # ask user to change bootdrive before setup
# setup: drives there but unmounted & no blitz config exists