#!/bin/bash

# Description: H3C R4900 G2 BIOS Fw Update
# 2020-04-29: 拆分BMC/BIOS/RAID升级包（allin.han）

currentDir=`pwd`
resultLog="`pwd`/result.log"

source "${currentDir}/bios.conf"

function biosCheckAndUpdate() {
       	biosVersion=`dmidecode -t bios | grep "Version:"| awk '{print $NF}'`
	if [ "${biosVersion}" != "${BIOS_VERSION}" ]; then
		cd ${currentDir}/afu
		./afulnx_64_v5.12.01.1977 ./${BIOS_FILE} /P /B /N /R /X
	fi
}

biosCheckAndUpdate
