mirror of
https://github.com/raspberrypi/rpi-update.git
synced 2026-01-20 21:13:38 +08:00
Handle partition size check when partition is nfs mount
This commit is contained in:
@@ -222,12 +222,13 @@ function check_partition {
|
|||||||
local PARTSIZE=0
|
local PARTSIZE=0
|
||||||
if command -v df > /dev/null 2>&1 ; then
|
if command -v df > /dev/null 2>&1 ; then
|
||||||
local M=$(df -P ${BOOT_PATH} | awk 'END{print $1}')
|
local M=$(df -P ${BOOT_PATH} | awk 'END{print $1}')
|
||||||
if command -v lsblk > /dev/null 2>&1 ; then
|
if [[ $M == /dev/* ]]; then
|
||||||
PARTSIZE=$(lsblk -bno SIZE ${M})
|
if command -v lsblk > /dev/null 2>&1 ; then
|
||||||
|
PARTSIZE=$(lsblk -bno SIZE ${M})
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo PARTSIZE:$PARTSIZE
|
if [ $PARTSIZE -ne 0 ] && [ $PARTSIZE -lt $(( 256*1024*1024 )) ]; then
|
||||||
if [ $PARTSIZE -lt $(( 256*1024*1024 )) ]; then
|
|
||||||
echo "Partition size $(( $PARTSIZE >> 20 ))M may not be sufficient for new Pi4 files"
|
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 "This could result in a system that will not boot."
|
||||||
echo "256M FAT partition is recommended. Ensure you have a backup if continuing."
|
echo "256M FAT partition is recommended. Ensure you have a backup if continuing."
|
||||||
|
|||||||
Reference in New Issue
Block a user