HP ProLiant DL360e HP Smart Update Firmware DVD User Guide - Page 22

get list of iLO ips in enclosure from OA

Page 22 highlights

echo " BB1.sh " } 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

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47

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