#!/bin/ba
nvme_num=$1
chmod +x ./inspurmgr
v_version=$(./inspurmgr  list |grep nvme${nvme_num}n|awk '{print $NF}'|head -1)
if [ "${v_version}" == "HUT70040" ]
then
./inspurmgr fw-download -f firmware.tar /dev/nvme$nvme_num
sleep 1
./inspurmgr fw-activate -s 0x0 -a 0x01 /dev/nvme$nvme_num
sleep 3
./inspurmgr reset /dev/nvme$nvme_num
sleep 1
else
echo "SSD version is not HUT70040,not support update it "
fi
