#!/bin/csh

### figure out what dir this program was found/run in (but if there
### was no path mentioned, don't just assume "./")
if ( "X$0" !~ */* ) then
    set rundir = "";
else
    set rundir = "`dirname $0`/"
endif

# NOTE: To fix bug 82479, the following lines are being commented out,
#	pending a resolution to bug 43316. Invocation of this script 
#	had been commented of isi_gather_info due to that same reason,
#	but now, this script is being re-activated using a new method
#	of extracting the firmware versions that uses the sysctls of
#	the MPT driver. For more information, refer to bug 82479.
#echo "Extracting BIOS..."
#${rundir}isi_mptutil 0 -ub /tmp/mptimg | sed -e "s~^~    ~"
#echo "BIOS versions:"
#strings /tmp/mptimg | sed -ne "s~^@(#)~    ~p"

#echo ""
#echo "Extracting Firmware..."
#${rundir}isi_mptutil 0 -uf /tmp/mptimg | sed -e "s~^~    ~"
#echo "Firmware versions:"
#strings /tmp/mptimg | sed -ne "s~^\(.*\)@@(#)~    ~p"
#echo ""

#echo "Booted as:"
#sysctl hw.mpt0.mpifwver | sed -ne "s~^~    ~p"

# Bug 82479 - use sysctls to query firmware versions, not isi_mptutil.
echo -n "Firmware version: "
sysctl hw.mpt0.mpifwver | sed -e "s/^.*: //"
echo -n "Isilon mods version: "
set x = `sysctl hw.mpt0.mpifwmods | sed -e "s/^.*Revision: //"`
echo $x | sed -e "s/ .//"
echo -n "BIOS version: "
sysctl hw.mpt0.mpibiosver | sed -e "s/^.*: //"


