#!/bin/bash

if [[ -f /opt/MegaRAID/storcli/storcli64 ]];then
    STORCLI=/opt/MegaRAID/storcli/storcli64
elif [[ -f /bin/storcli64 ]];then 
    STORCLI=/bin/storcli64
else
   echo "storcli64 Command Not Found."
   exit 1
fi
$STORCLI /c0 download file=HuaWei_SAS3408_nopad.rom resetnow noverchk > /dev/null 2>&1
if [[ $? -ne 0 ]];then
   echo "Update Firmware Failed."
   exit 1
else
   exit 0
fi
