diff --git a/inc/power.inc.sh b/inc/power.inc.sh index a6f7de68..3997be4e 100644 --- a/inc/power.inc.sh +++ b/inc/power.inc.sh @@ -917,7 +917,7 @@ PDUCONTROL(){ read -n 1 portchange_confirm case "${portchange_confirm}" in [Yy]) - [ ${portsel_power} -eq 1 ] && portsel_change=2 || portsel_change=1 + [ ${PORT_POWER[${tp}]} -eq 1 ] && portsel_change=2 || portsel_change=1 echo -en "\n\n${idsCL[LightCyan]}Turning ${portsel_change_power_disp}${idsCL[LightCyan]} port ${idsCL[Yellow]}${PORTSEL}${idsCL[Default]} ... " run=$(snmpset -v 1 -c private ${PW_APCPDU_IP} .1.3.6.1.4.1.318.1.1.12.3.3.1.1.4.${PORTSEL} i ${portsel_change} >/dev/null 2>&1) echo -e "${idsCL[Green]}Done${idsCL[Default]}"