HP Smart Update Firmware DVD User Guide

echo " BB1.sh <OA_ipaddress> <OA_username> <OA_password>
<script_filename>"
}
if [ "$4" = "" ]
then
usage
exit
fi
host=$1
user=$2
passwd=$3
script=$4
hostfile="hostlist.txt"
# If you want to use a pre-made/modified list, just comment out the if
statement
# and the "show server list" line as well.
if [ -f ${TMP}/${hostfile} ]
then
echo "removing ${TMP}/${hostfile}"
rm -f ${TMP}/${hostfile}
fi
echo Retrieving Blade ips from OA
#
# get list of iLO ips in enclosure from OA
#
#/usr/bin/ssh $user@$host "show server list"|grep OK |awk '{print $3}'
>> ${TMP}/${hostfile}
# or do
/usr/bin/ssh $user@$host "show server list"|grep OK >> ${TMP}/${hostfile}
#
# The for loop will loop thru the results of the above command.
# You can then invoke a RIBCL script on each ip via a wrapper shell
script.
#
for ip in 'awk '{print $3}' ${TMP}/${hostfile}';
do
echo Inserting Virtual Media on ${ip};
./Insert_Virtual_Media.sh ${ip} ${user} ${passwd};
echo ${script} on [$ip];
./${script} ${ip} ${user} ${passwd};
done
22 Smart Update Firmware DVD Automatic Deployment Mode