From 7f0651261b05537170f01744e9fbd0fba0dce418 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Tue, 7 Jan 2025 20:06:51 +0100 Subject: [PATCH] fix syntax --- home.admin/config.scripts/blitz.data.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/home.admin/config.scripts/blitz.data.sh b/home.admin/config.scripts/blitz.data.sh index 8c1639c65..9595a6549 100644 --- a/home.admin/config.scripts/blitz.data.sh +++ b/home.admin/config.scripts/blitz.data.sh @@ -255,13 +255,16 @@ if [ "$1" = "status" ]; then fi done <<< "${ext4Partitions}" - # check boot situation for status - if[ ${#storageDevice} -gt 0 ] && [ "${storageDevice}" == "${systemDevice}" ]; then + # check boot situation + if [ -n "${storageDevice}" ] && [ "${storageDevice}" = "${systemDevice}" ]; then + # system runs from storage device bootFromStorage=1 bootFromSD=0 else + # system might run from SD card bootFromStorage=0 - bootFromSD=$(lsblk | grep mmcblk | grep -c /boot) + # check if boot partition is on SD card (mmcblk) + bootFromSD=$(findmnt -n /boot | grep -c "^/dev/mmcblk") fi # get a list of all connected drives >7GB ordered by size (biggest first)