diff --git a/inc/power.inc.sh b/inc/power.inc.sh index 67c8cb89..a11ae1c1 100644 --- a/inc/power.inc.sh +++ b/inc/power.inc.sh @@ -868,15 +868,13 @@ PDUCONTROL(){ read -rd '' -a PORT_DESC <<<"${PORT_DESC}" read -rd '' -a PORT_POWER <<<"${PORT_POWER}" unset IFS - p=1 for p in "${!PORT_DESC[@]}"; do port=$(expr ${p} + 1) [ ${PORT_POWER[${p}]} -eq 1 ] && portpower_disp="${idsCL[Green]}ON" || portpower_disp="${idsCL[LightRed]}OFF" [ ${port} -lt 10 ] && pp=" ${port}" || pp=${port} - # c=0; spc=''; spc1=`expr 28 - ${#port}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done + c=0; spc=''; spc1=`expr 28 - ${#port}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done spc=" " echo -e "${pp}) ${idsCL[LightCyan]}${PORT_DESC[${p}]}${spc}${idsCL[Default]}: ${portpower_disp}${idsCL[Default]}" - # ((p++)) done echo -e "" echo -e ""