From c7c8cd1ecd194acc6e6dddf4e51d3b07515114b4 Mon Sep 17 00:00:00 2001 From: Wrzlprnft Date: Mon, 19 Jul 2021 16:01:38 +0200 Subject: [PATCH] fix locale causing memory preflight check to fail if the locale uses a decimal `,` instead of `.`, the memory preflight check fails fix provided by @gort818 --- lug-helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lug-helper.sh b/lug-helper.sh index 919cb52..0266b8a 100755 --- a/lug-helper.sh +++ b/lug-helper.sh @@ -665,7 +665,7 @@ filelimit_check() { # Check total system memory memory_check() { - memtotal="$(awk '/MemTotal/ {printf "%.1f \n", $2/1024/1024}' /proc/meminfo)" + memtotal="$(LC_NUMERIC=C awk '/MemTotal/ {printf "%.1f \n", $2/1024/1024}' /proc/meminfo)" if [ ${memtotal%.*} -ge "15" ]; then preflight_pass+=("Your system has $memtotal GB of memory.") else