#!/bin/bash

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

_check() {
    _check="PASS"

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

    if [[ $Manufacture == 'PUERSAI' && $ManufactureType == 'G7666 X6' ]];then
        :
    elif [[ $Manufacture == 'ROYCOM' && $ManufactureType == 'G7666 X6' ]];then
    	:
    elif [[ $Manufacture == 'SUPERCLOUD' && $ManufactureType == 'R8629 G13' ]];then
    	:
    else
    	return 0
    fi

    CPLD_VER=$(ipmitool raw 0x3c 0x14 0x00 0xe5 0xaa 0x03 0x19)
    CPLD_R=' 00 e5 aa 56 30 30 33 50 30 31 00'

    if [[ $CPLD_VER != $CPLD_R ]];then
        PRINT_ERR "[ERROR] CPLD 版本不匹配 联系硬件运维手动升级 $CPLD_VER"
        _check="FAIL"
    fi

}
