aboutsummaryrefslogtreecommitdiff
path: root/buildos
diff options
context:
space:
mode:
Diffstat (limited to 'buildos')
-rwxr-xr-xbuildos6
1 files changed, 3 insertions, 3 deletions
diff --git a/buildos b/buildos
index 4bb44b9..2d8d043 100755
--- a/buildos
+++ b/buildos
@@ -215,11 +215,11 @@ fi
#
# Note that MemTotal in /proc/meminfo is the available memory, not physical.
# And to make it easier to provision memory it's really helpful to base it
-# in the physical value.
+# on the physical value.
#
ram_total=0
-for i in $(sudo dmidecode -t 17 | sed -n -re 's/^\s*Size:\s*([0-9]+)\s*MB.*$/\1/p'); do
- ram_total=$(($ram_total + $i * 1024))
+for i in $(sudo dmidecode -t 17 | sed -n -re 's/^\s*Size:\s*([0-9]+)\s*GB.*$/\1/p'); do
+ ram_total=$(($ram_total + $i * 1024 * 1024))
done
if [ "$ram_total" -eq 0 ]; then