2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 11:42:05 +00:00
xcat-core/xCAT/postscripts/check_mlnx_firmware
Victor Hu 6c01fed51c Create some sample postscripts that users can run to check
Mellanox OFED/Adapter firmware levels and update the adapter
firmware level independent on installing a new version of OFED
2017-10-03 12:00:54 -04:00

29 lines
698 B
Bash
Executable File

#!/bin/sh
#
# Sample postscript that can be executed to check the Mellanox OFED version
# and adapter firmware level on the Mellanox adapters installed on the target nodes
#
#
BINARIES="ofed_info mst ibdev2netdev"
for PROG in ${BINARIES}; do
RC=`command -v ${PROG} >> /dev/nul 2>&1; echo $?`
if [[ ${RC} != 0 ]]; then
echo "${PROG} is not installed on this node, unable to check firmware levels."
exit 1
fi
done
MELLANOX_SOFTWARE=`ofed_info -s | cut -d: -f1`
echo "Mellanox Software: $MELLANOX_SOFTWARE"
mst start >> /dev/null
if [[ $? != 0 ]]; then
echo "Error: Could not start mst, cannot check adapter firmware level."
exit 1
fi
ibdev2netdev -v
exit 0