Update power.inc.sh
This commit is contained in:
@@ -890,8 +890,8 @@ PDUCONTROL(){
|
||||
|
||||
[ "${PORTSEL^^}" == "E" ] && exit 0
|
||||
|
||||
# tp=$(expr ${PORTSEL} - 1)
|
||||
if [ "${PORT_DESC[$(expr ${PORTSEL} - 1)]}" != "" ]; then
|
||||
tp=$(expr ${PORTSEL} - 1)
|
||||
if [ "${PORT_DESC[${tp}]}" != "" ]; then
|
||||
portsel_power=$(snmpwalk -t 1 -r 0 -v 1 -c public ${PW_APCPDU_IP} .1.3.6.1.4.1.318.1.1.12.3.3.1.1.4.${PORTSEL} -O vq 2> /dev/null | sed -e 's/"//g')
|
||||
[ ${portsel_power} -eq 1 ] && portsel_power_disp="${idsCL[Green]}ON" || portsel_power_disp="${idsCL[LightRed]}OFF"
|
||||
[ ${portsel_power} -eq 2 ] && portsel_change_power_disp="${idsCL[Green]}ON" || portsel_change_power_disp="${idsCL[LightRed]}OFF"
|
||||
|
||||
Reference in New Issue
Block a user