#!/bin/bash
CPWD=`cd $(dirname  $0);pwd`
os_version=`uname -r |awk -F"el" '{print $2}' |awk -F"." '{print $1}'`
BIOS_Ver=`dmidecode -t 0 |awk '/Version/{print $NF}' |sed 's/\s*//g'`
Pro_name=`ipmitool fru print 0 |awk -F":" '/Product Name/{print $NF}' |sed 's/^\s*//g'`

P6220(){
if [[ "${os_version}" = "7" ]] && [[ "${BIOS_Ver}" = "A40B07A019" ]];then
    ./SCELNX_64_5.05.01.0002_2021 /i /s huaqin_P6220_bios.cfg 
fi
}

if [[ "${Pro_name}" == "P6220" ]];then
        P6220
else 
	echo "this machine don't have BIOScfg file"
	exit 1
fi
