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

G679V3_BiosConfigImport(){
if [[ "${os_version}" = "7" ]] && [[ "${BIOS_Ver}" = "T1DMGEP09.35" ]];then
    if [[ -d "/sys/firmware/efi" ]];then
        ./SCELNX_64 /i /s G679V3_efi_250828.cfg 
    else
        exit 1
    fi
fi
}


if [[ "$Pro_name" =~ "G679V3" ]] ;then
    G679V3_BiosConfigImport
else
    echo "this machine don't have BiosConfig file"
    exit 1	
fi
