From 935e7e115e515aae442983ffafa596f916fc9720 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Thu, 7 Dec 2023 10:07:07 +0100 Subject: [PATCH] core183: update disk-space/size check Signed-off-by: Arne Fitzenreiter --- config/rootfiles/core/183/update.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 -- 2.39.5