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

SY4108G-G4_BiosConfigImport(){
if [[ "${os_version}" = "7" ]] && [[ "${BIOS_Ver}" = "G4DCT415C05695V02" ]];then
    if [[ -d "/sys/firmware/efi" ]];then
        ./SCELNX_64 /i /s SY4108G-G4_efi_250824.cfg
    else
        exit 1
    fi
fi
}


if [[ "$Pro_name" == "SY4108G-G4" ]] ;then
    SY4108G-G4_BiosConfigImport
else
    echo "this machine don't have BiosConfig file"
    exit 1	
fi
