2008-12-09 20:40:25 +00:00
|
|
|
#!/bin/bash
|
2008-12-09 15:23:12 +00:00
|
|
|
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
2008-12-09 20:40:25 +00:00
|
|
|
fwpref=${rvid_fwrev%%???}
|
|
|
|
fwver=${rvid_fwrev##????}
|
|
|
|
fwmaj=${fwver%%?}
|
|
|
|
if [ -z "$fwmaj" ]; then
|
|
|
|
echo "Unable to recognize AMM firmware revision"
|
|
|
|
exit 1
|
|
|
|
fi
|
2008-12-09 16:26:40 +00:00
|
|
|
mkdir -p /tmp/xcat
|
2008-12-09 15:23:12 +00:00
|
|
|
if [ ! -f /tmp/xcat/$rvid_server.remotekvm.jar ]; then
|
2010-10-15 17:01:41 +00:00
|
|
|
wget --no-check-certificate -O /tmp/xcat/$rvid_server.remotekvm.jar http://$rvid_server/private/remotekvm.jar >& /dev/null
|
2008-12-09 15:23:12 +00:00
|
|
|
fi
|
2008-12-09 20:40:25 +00:00
|
|
|
if [ $fwpref == 'BPET' ]; then
|
2011-03-31 18:22:32 +00:00
|
|
|
if [[ "0x$fwmaj" -ge 46 ]]; then
|
2010-03-11 20:33:59 +00:00
|
|
|
java -jar /tmp/xcat/$rvid_server.remotekvm.jar -s $rvid_server -r $rvid_authtoken -b $rvid_slot -B -R >& /dev/null
|
2008-12-09 20:40:25 +00:00
|
|
|
elif [ $fwmaj -ge 42 ]; then
|
2008-12-10 18:28:08 +00:00
|
|
|
echo "Unable to securely support $rvid_fwrev in an adequately secure manner, please upgrade to BPET46C or better"
|
|
|
|
exit 1
|
2008-12-09 20:40:25 +00:00
|
|
|
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
|
2008-12-09 15:23:12 +00:00
|
|
|
|
2008-12-09 20:40:25 +00:00
|
|
|
rm /tmp/xcat/$rvid_server.remotekvm.jar
|