From 06981a3b4c07c0a5ca96e06e332513077858bdf6 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Fri, 2 Oct 2020 17:34:43 +0700 Subject: [PATCH] Add 200MB offset to RAM check (#257) --- scripts/update/check-memory | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/update/check-memory b/scripts/update/check-memory index 443cbba..f47931b 100755 --- a/scripts/update/check-memory +++ b/scripts/update/check-memory @@ -5,11 +5,14 @@ RELEASE=$1 UMBREL_ROOT=$2 first_run=$3 +# We add a 200MB offset becuase the 2GB Pi actually only has ~1.9GB of RAM MIN_RAM=2000000 +OFFSET=200000 +LIMIT=$((MIN_RAM-OFFSET)) # Abort on low memory devices memory="$(awk '/MemTotal/{printf "%d\n", $2}' /proc/meminfo)" -if ((memory "$UMBREL_ROOT"/statuses/update-status.json {"state": "installing", "progress": 20, "description": "Checking device memory", "updateTo": "${RELEASE}"}