#!/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'`

WenTian_WR5225_G3_BiosConfigImport(){
if [[ "${os_version}" = "7" ]] && [[ "${BIOS_Ver}" = "kae154h-3.10" ]];then
    if [[ -d "/sys/firmware/efi" ]];then
        ./SCELNX_64 /i /s WenTian_WR5225G3_EFI_260414.cfg 
    else
        exit 1
    fi
fi
}


if [[ "$Pro_name" == "Lenovo WenTian WR5225 G3" ]] ;then
    WenTian_WR5225_G3_BiosConfigImport
else
    echo "this machine don't have BiosConfig file"
    exit 1	
fi
