Update power.inc.sh

This commit is contained in:
2024-01-12 19:31:18 -06:00
parent e78dbd495d
commit 567626b914

View File

@@ -861,7 +861,6 @@ PDUCONTROL(){
echo -e "${idsCL[Yellow]}APC-PDU Power Control"
DIVIDER true yellow 75
[ "${PORT_SEL}" != "" ] && PORTSEL=${PORT_SEL}
echo "HERE: '${PORT_SEL}' - '${PORTSEL}'"
if [ "${PORTSEL}" == "" ]; then
PORT_DESC=$(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.2 -O vq 2> /dev/null | sed -e 's/"//g')
PORT_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 -O vq 2> /dev/null | sed -e 's/"//g')
@@ -881,11 +880,11 @@ PDUCONTROL(){
echo -e "(${idsCL[Yellow]}E${idsCL[Default]})xit"
echo -e ""
echo -e "\033[5A"
until [ "${PORTSEL}" != "" ]; do
# until [ "${PORTSEL}" != "" ]; do
echo -en "\n${idsCL[LightCyan]}Enter the port number to control: ${idsCL[Default]}"
read PORTSEL
echo
done
# done
fi
[ "${PORTSEL^^}" == "E" ] && exit 0