#!/bin/bash
CV=`ipmitool fru |grep "Chassis Part Number" |awk '{print $NF}'`
BIOS_Ver=`dmidecode -t 0 |awk '/Version/{print $NF}' |sed 's/\s*//g'`
if [[ "$CV" =~ "V5" ]];then
	ipmitool fru edit 0 field p 3 "SKL"
	if [[ "${BIOS_Ver}" != "IC1U109F" ]];then
		echo E|./afulnx_64 IC1U109F.bin /x /p /b /n /k /me
	fi
elif [[ "$CV" =~ "V6" ]];then
	ipmitool fru edit 0 field p 3 "CXL"
	if [[ "${BIOS_Ver}" != "IC1U109F" ]];then
        	echo E|./afulnx_64 IC1U109F.bin /x /p /b /n /k /me

        fi
fi
