]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
core121/122: update needed diskspace
authorArne Fitzenreiter <arne_f@ipfire.org>
Tue, 19 Jun 2018 08:58:47 +0000 (10:58 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Tue, 19 Jun 2018 08:58:47 +0000 (10:58 +0200)
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
config/rootfiles/core/121/update.sh
config/rootfiles/core/122/update.sh

index 4d19e48f59d7ef114d9d35a380b79f2bf3bb2864..18019c1d7957bc475619157dd9289fdb78638edd 100644 (file)
@@ -41,6 +41,23 @@ for (( i=1; i<=$core; i++ )); do
        rm -f /var/cache/pakfire/core-upgrade-*-$i.ipfire
 done
 
+# Do some sanity checks.
+case $(uname -r) in
+       *-ipfire*)
+               # Ok.
+               ;;
+       *)
+               exit_with_error "ERROR cannot update. No IPFire Kernel." 1
+               ;;
+esac
+
+# Check diskspace on root
+ROOTSPACE=`df / -Pk | sed "s| * | |g" | cut -d" " -f4 | tail -n 1`
+
+if [ $ROOTSPACE -lt 220000 ]; then
+       exit_with_error "ERROR cannot update because not enough free space on root." 2
+       exit 2
+fi
 
 # Stop services
 
@@ -95,3 +112,4 @@ sync
 
 # Don't report the exitcode last command
 exit 0
+
index 925886e276f3b4c26963bafbcb5e9c1893b0b592..e678e98a35450c42267ab3b900ddd4cba43ed48c 100644 (file)
@@ -61,7 +61,7 @@ esac
 # Check diskspace on root
 ROOTSPACE=`df / -Pk | sed "s| * | |g" | cut -d" " -f4 | tail -n 1`
 
-if [ $ROOTSPACE -lt 100000 ]; then
+if [ $ROOTSPACE -lt 80000 ]; then
        exit_with_error "ERROR cannot update because not enough free space on root." 2
        exit 2
 fi