]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
core183: update disk-space/size check
authorArne Fitzenreiter <arne_f@ipfire.org>
Thu, 7 Dec 2023 09:07:07 +0000 (10:07 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Thu, 7 Dec 2023 09:07:07 +0000 (10:07 +0100)
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
config/rootfiles/core/183/update.sh

index 842e6f638233293aa55e69a3b86c0195ba020912..8eaab80c24aded11a269a42f953e532298c43fe1 100644 (file)
@@ -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