From a29ab2594beff9b10d8ab985a6927f51c95d1750 Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 14 Mar 2025 14:40:42 +0100 Subject: [PATCH] Update reset.sh --- src/reset.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/reset.sh b/src/reset.sh index 2fdec8a..2dea5a0 100644 --- a/src/reset.sh +++ b/src/reset.sh @@ -133,13 +133,12 @@ if [[ "${FS,,}" == "ecryptfs" ]] || [[ "${FS,,}" == "tmpfs" ]]; then DISK_CACHE="writeback" fi -# Check memory - -[[ "${FS,,}" == "zfs" ]] && RAM_CHECK="N" +# Check available memory if [[ "$RAM_CHECK" != [Nn]* ]] && (( (RAM_WANTED + RAM_SPARE) > RAM_AVAIL )); then - error "Your configured RAM_SIZE of $WANTED_GB GB is too high for the $AVAIL_GB GB of memory available, please set a lower value." - exit 17 + msg="Your configured RAM_SIZE of $WANTED_GB GB is too high for the $AVAIL_GB GB of memory available, please set a lower value." + [[ "${FS,,}" != "zfs" ]] && error "$msg" && exit 17 + info "$msg" fi # Helper functions