xcat-core/xCAT-client/share/xcat/rvid/rvid.blade
2008-12-09 20:55:31 +00:00

28 lines
1.1 KiB
Plaintext
Executable File

#!/bin/bash
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
fwpref=${rvid_fwrev%%???}
fwver=${rvid_fwrev##????}
fwmaj=${fwver%%?}
if [ -z "$fwmaj" ]; then
echo "Unable to recognize AMM firmware revision"
exit 1
fi
mkdir -p /tmp/xcat
if [ ! -f /tmp/xcat/$rvid_server.remotekvm.jar ]; then
wget -O /tmp/xcat/$rvid_server.remotekvm.jar http://$rvid_server/private/remotekvm.jar >& /dev/null
fi
if [ $fwpref == 'BPET' ]; then
if [ $fwmaj -ge 46 ]; then
java -jar /tmp/xcat/$rvid_server.remotekvm.jar -s $rvid_server -r $rvid_authtoken -b $rvid_slot >& /dev/null
elif [ $fwmaj -ge 42 ]; then
java -jar /tmp/xcat/$rvid_server.remotekvm.jar $rvid_server -rbs $rvid_authtoken -ba $rvid_ba -port $rvid_port >& /dev/null
else
echo "Unknown method for firmware $rvid_fwrev, ensure it is at least BPET42R";
fi
else
echo "Unknown semantics for $fwpref, trying a particular way, may not work."
java -jar /tmp/xcat/$rvid_server.remotekvm.jar $rvid_server -rbs $rvid_authtoken -ba $rvid_ba -b $rvid_slot >& /dev/null
fi
rm /tmp/xcat/$rvid_server.remotekvm.jar