#!/bin/bash

_install() {
        if [[ $VMFLAG = 1 ]];then
                return 0
        fi
}

_check() {
    _check="PASS"

    if [[ $VMFLAG = 1 ]];then
        return 0
    fi

    local real_mem=0
    for mem in `dmidecode -t17|grep "^\s*Size"|grep [0-9]|tr ' ' ','`;
    do
        size=`echo $mem|cut -d',' -f2`
        unit=`echo $mem|cut -d',' -f3`
        if [[ $unit = 'MB' ]];then
            size=$(($size/1024))
        fi
        real_mem=$(($real_mem+$size))
    done

    local mem_size=$Memory

    if [[ $mem_size -ne $real_mem ]];then
        _check="FAIL"
        PRINT_ERR "[ERROR] Memory Size Is $real_mem Not $mem_size, Check Memory Bank."
    fi
}
