This commit is contained in:
2023-12-30 10:57:39 -06:00
parent c708d8929d
commit 18ab96b904
4 changed files with 6 additions and 301 deletions

View File

@@ -412,7 +412,7 @@ SHUTDOWN_SERVER(){
MSG="Waiting for VM's, will then shutdown: ${PW_ESXI_HOST_NAMES[${ESXIHOST}]}"
c=0; MSG_SPC=''; spc1=`expr ${HC_CW} - ${#MSG}`; until [ ${c} = ${spc1} ]; do MSG_SPC="${MSG_SPC} "; ((c++)); done
echo -en "${idsCL[White]}${MSG//${PW_ESXI_HOST_NAMES[${ESXIHOST}]}/${idsCL[LightCyan]}${PW_ESXI_HOST_NAMES[${ESXIHOST}]}}${idsCL[White]}${MSG_SPC}: "
if [ "${TEST}" != "true" ]; then
if [ "${TEST^^}" != "TRUE" ] && [ "${TEST_DONOT_SHUTDOWN^^}" != "TRUE" ]; then
if [ "$(ipmitool -I lanplus -H ${PW_HOST_IDRACS[${PW_ESXI_HOST_NAMES[${ESXIHOST}]}]} -U ${PW_ESXI_USER} -P "${PW_ESXI_PASS}" chassis power status | grep 'Power is on')" != "" ]; then
MAINT_MODE_VERIFY_SHUTDOWN ${ESXIHOST} &
echo -e "${idsCL[Green]}Continuing in background${idsCL[Default]}"