Update power.inc.sh

This commit is contained in:
2024-01-12 19:19:21 -06:00
parent de350e2b82
commit 32edda3ddd

View File

@@ -871,11 +871,11 @@ PDUCONTROL(){
for port in "${!PORT_DESC[@]}"; do for port in "${!PORT_DESC[@]}"; do
echo "HERE: $port - ${PORT_POWER[${port}]} - ${PORT_DESC[${port}]}" echo "HERE: $port - ${PORT_POWER[${port}]} - ${PORT_DESC[${port}]}"
p=$(expr ${port} + 1) p=$(expr ${port} + 1)
[ ${PORT_POWER[${port}]} -eq 1 ] && portpower_disp="${idsCL[Green]}ON" || portpower_disp="${idsCL[LightRed]}OFF" [ ${PORT_POWER[${p}]} -eq 1 ] && portpower_disp="${idsCL[Green]}ON" || portpower_disp="${idsCL[LightRed]}OFF"
[ ${p} -lt 10 ] && pp=" ${p}" || pp=${p} [ ${p} -lt 10 ] && pp=" ${p}" || pp=${p}
# 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=" " spc=" "
echo -e "${pp}) ${idsCL[LightCyan]}${PORT_DESC[${port}]}${spc}${idsCL[Default]}: ${portpower_disp}${idsCL[Default]}" # echo -e "${pp}) ${idsCL[LightCyan]}${PORT_DESC[${port}]}${spc}${idsCL[Default]}: ${portpower_disp}${idsCL[Default]}"
# ((p++)) # ((p++))
done done
echo -e "" echo -e ""