From: Arne Fitzenreiter Date: Thu, 7 Dec 2023 09:07:07 +0000 (+0100) Subject: core183: update disk-space/size check X-Git-Tag: v2.29-core183~113 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=935e7e115e515aae442983ffafa596f916fc9720;p=ipfire-2.x.git core183: update disk-space/size check Signed-off-by: Arne Fitzenreiter --- diff --git a/config/rootfiles/core/183/update.sh b/config/rootfiles/core/183/update.sh index 842e6f6382..8eaab80c24 100644 --- a/config/rootfiles/core/183/update.sh +++ b/config/rootfiles/core/183/update.sh @@ -62,12 +62,14 @@ case $(uname -r) in ;; esac -# Check diskspace on root +# Check diskspace on root and size of boot ROOTSPACE=$( df / -Pk | sed "s| * | |g" | cut -d" " -f4 | tail -n 1 ) - -if [ $ROOTSPACE -lt 100000 ]; then +if [ $ROOTSPACE -lt 200000 ]; then exit_with_error "ERROR cannot update because not enough free space on root." 2 - exit 2 +fi +BOOTSIZE=$( df /boot -Pk | sed "s| * | |g" | cut -d" " -f2 | tail -n 1 ) +if [ $BOOTSIZE -lt 100000 ]; then + exit_with_error "ERROR cannot update. BOOT partition is to small." 3 fi # Remove the old kernel