* Change check for linux memory
Some VMs clock in at *just under* 1GB, so checking for 1GB of RAM will miss these. Instead, check for MB, divide by 1000 and round up.
* Refine the check_linux_memory function
Be a little more precise and only make an exception for VMs with >= 990MB RAM
## Linux available memory
##
check_linux_memory() {
- echo `free -g --si | awk ' /Mem:/ {print $2} '`
+ ## some VMs report just under 1GB of RAM, so
+ ## make an exception and allow those with more
+ ## than 989MB
+ mem=`free -m --si | awk ' /Mem:/ {print $2}'`
+ if [ "$mem" -ge 990 -a "$mem" -lt 1000 ]; then
+ echo 1
+ else
+ echo `free -g --si | awk ' /Mem:/ {print $2} '`
+ fi
}
##