Skip to content

Commit

Permalink
SW-4540 use correct command to check sd card size (#135)
Browse files Browse the repository at this point in the history
* grep the correct disk on the sd card
  • Loading branch information
amrithvenkat authored Apr 18, 2024
1 parent 44c81aa commit 45d5a17
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ do_precondition_checks () {

# Check the size of SD-Card
echo "$(timestamp) $0: Checking the size of SD-Card."
local SD_CARD_SIZE=$(lsblk -b -o SIZE /dev/mmcblk0 | tail -n 1)
local SD_CARD_SIZE=$(lsblk -b -o SIZE,TYPE /dev/mmcblk0 | grep "disk" | awk '{print $1}')
SD_CARD_SIZE_GIGABYTES=$((SD_CARD_SIZE / 1024 / 1024 / 1024))
echo "$(timestamp) $0: SD-Card size - ${SD_CARD_SIZE_GIGABYTES}GB found"
if [ "$SD_CARD_SIZE" -gt $((MIN_SD_SIZE_IN_GB * 1024 * 1024 * 1024)) ]; then
Expand Down

0 comments on commit 45d5a17

Please sign in to comment.