Update powerwall.sh
This commit is contained in:
@@ -1154,9 +1154,12 @@ HOSTPOWER(){
|
||||
|
||||
if [ "${idracip}" != "" ]; then
|
||||
host=${PW_iDRACHOST_SHORTNAMES[${idracip}]}
|
||||
echo -e "${idsCL[LightCyan]}Hostname : ${idsCL[Green]}${host}${idsCL[Default]}"
|
||||
echo -e "${idsCL[LightCyan]}Host IP : ${idsCL[Green]}${PW_HOST_ADDRESSES[${host}]}${idsCL[Default]}"
|
||||
c=0; spcA=''; spc1=`expr 20 - ${#host} - 1`; until [ $c = ${spc1} ]; do spcA="${spcA} "; c=`expr $c + 1`; done
|
||||
c=0; spcB=''; spc1=`expr 20 - ${#PW_HOST_ADDRESSES[${host}]} - 1`; until [ $c = ${spc1} ]; do spcA="${spcA} "; c=`expr $c + 1`; done
|
||||
echo -en "${idsCL[LightCyan]}Host : ${idsCL[Green]}${host}${spcA}"
|
||||
echo -en "${idsCL[LightCyan]}Host IP : ${idsCL[Green]}${PW_HOST_ADDRESSES[${host}]}${spcB}"
|
||||
echo -e "${idsCL[LightCyan]}iDrac IP : ${idsCL[Green]}${idracip}${idsCL[Default]}"
|
||||
DIVIDER . yellow 75
|
||||
echo
|
||||
if [ "${2,,}" == "on" ] || [ "${2,,}" == "off" ] || [ "${2,,}" == "status" ]; then
|
||||
ssh root@${PW_RACADM_ACCESS} ipmitool -I lanplus -H ${idracip} -U ${PW_ESXI_USER} -P "'${PW_ESXI_PASS}'" chassis power ${2,,}
|
||||
|
||||
Reference in New Issue
Block a user