From 0f1505325815b2e58cec78ed6ff08701db6cdc3c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 19 Sep 2019 11:12:45 +0100 Subject: [PATCH] Handle partition size check when partition is nfs mount --- rpi-update | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rpi-update b/rpi-update index dd9910c..ded1b20 100755 --- a/rpi-update +++ b/rpi-update @@ -222,12 +222,13 @@ function check_partition { local PARTSIZE=0 if command -v df > /dev/null 2>&1 ; then local M=$(df -P ${BOOT_PATH} | awk 'END{print $1}') - if command -v lsblk > /dev/null 2>&1 ; then - PARTSIZE=$(lsblk -bno SIZE ${M}) + if [[ $M == /dev/* ]]; then + if command -v lsblk > /dev/null 2>&1 ; then + PARTSIZE=$(lsblk -bno SIZE ${M}) + fi fi fi - echo PARTSIZE:$PARTSIZE - if [ $PARTSIZE -lt $(( 256*1024*1024 )) ]; then + if [ $PARTSIZE -ne 0 ] && [ $PARTSIZE -lt $(( 256*1024*1024 )) ]; then echo "Partition size $(( $PARTSIZE >> 20 ))M may not be sufficient for new Pi4 files" echo "This could result in a system that will not boot." echo "256M FAT partition is recommended. Ensure you have a backup if continuing."