This commit is contained in:
2024-11-16 16:42:23 -06:00
parent 1b1b9f3119
commit b1c8927b9b
3 changed files with 26 additions and 50 deletions

View File

@@ -1241,7 +1241,7 @@ HOSTPOWER(){
if [ "${idracip}" != "" ]; then
if [ "${2^^}" = "ON" ] || [ "${2^^}" = "OFF" ] || [ "${2^^}" = "STATUS" ]; then
if [ "${idracip}" = "10.10.2.20" ] && [ "${2^^}" = "ON" ]; then
if [ "${idracip}" = "${PW_HOST_IDRACS[${PW_ESXI_HOST_NAMES[${PW_ISCSI-PRI_HOST}]}" ] && [ "${2^^}" = "ON" ]; then
MSG="Powering ON the SAS Enclosure"
c=0; MSG_SPC=''; spc1=`expr ${HC_CW} - ${#MSG}`; until [ ${c} = ${spc1} ]; do MSG_SPC="${MSG_SPC} "; ((c++)); done
echo -en "\n${idsCL[LightCyan]}${MSG}${MSG_SPC}: "
@@ -1273,12 +1273,12 @@ HOSTPOWER(){
fi
echo -e "${idsCL[Default]}"
if [ "${idracip}" = "10.10.2.20" ] && [ "${2^^}" = "OFF" ]; then
if [ "${idracip}" = "${PW_HOST_IDRACS[${PW_ESXI_HOST_NAMES[${PW_ISCSI-PRI_HOST}]}]}" ] && [ "${2^^}" = "OFF" ]; then
MSG="Powering OFF the SAS Enclosure"
c=0; MSG_SPC=''; spc1=`expr ${HC_CW} - ${#MSG}`; until [ ${c} = ${spc1} ]; do MSG_SPC="${MSG_SPC} "; ((c++)); done
echo -en "${idsCL[LightCyan]}${MSG}${MSG_SPC}: "
if [ "${TEST}" != "true" ]; then
if [ "$(CHECK_HOST 10.10.2.10)" = "false" ]; then
if [ "$(CHECK_HOST ${PW_ISCSI-PRI_HOST})" = "false" ]; then
run=$(snmpset -v 1 -c private ${PW_APCPDU_IP} .1.3.6.1.4.1.318.1.1.12.3.3.1.1.4.14 i 2 >/dev/null 2>&1)
sleep 3s
echo -e "${idsCL[Green]}Done${idsCL[Default]}\n"