#!/bin/bash

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

_check() {
    _check="PASS"

    if [[ $VMFLAG = 1 ]];then
        return 0
    fi
    if grep -q "Uncorrected error|Corrected Memory Error" /var/log/messages
    then
        _check="FAIL"
        PRINT_ERR "[ERROR] Found Memory Error, Please Check Memory Bank And IPMI Log."
    fi
    if ipmitool sel elist |grep -q 'Correctable ECC'
    then
        _check="FAIL"
        PRINT_ERR "[ERROR] ipmitool sel: Found Memory Error, 请硬件运维核实."
    fi
}
