From 3774f589c8de8db4747ff198d0d136874e382869 Mon Sep 17 00:00:00 2001 From: Helmuth Gronewold Date: Mon, 25 Aug 2014 23:36:55 +0200 Subject: [PATCH] locale-safe check if we have enough memory installed --- setup/preflight.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/preflight.sh b/setup/preflight.sh index 742d6db9..afa43027 100644 --- a/setup/preflight.sh +++ b/setup/preflight.sh @@ -19,8 +19,8 @@ fi # Check that we have enough memory. Skip the check if we appear to be # running inside of Vagrant, because that's really just for testing. -TOTAL_PHYSICAL_MEM=$(free -m | grep ^Mem: | sed "s/^Mem: *\([0-9]*\).*/\1/") -if [ $TOTAL_PHYSICAL_MEM -lt 768 ]; then +TOTAL_PHYSICAL_MEM=$(head -n 1 /proc/meminfo | awk '{print $2}') +if [ $TOTAL_PHYSICAL_MEM -lt 786432 ]; then if [ ! -d /vagrant ]; then echo "Your Mail-in-a-Box needs more than $TOTAL_PHYSICAL_MEM MB RAM." echo "Please provision a machine with at least 768 MB, 1 GB recommended."