Update power.inc.sh
This commit is contained in:
@@ -861,7 +861,6 @@ PDUCONTROL(){
|
|||||||
echo -e "${idsCL[Yellow]}APC-PDU Power Control"
|
echo -e "${idsCL[Yellow]}APC-PDU Power Control"
|
||||||
DIVIDER true yellow 75
|
DIVIDER true yellow 75
|
||||||
[ "${PORT_SEL}" != "" ] && PORTSEL=${PORT_SEL}
|
[ "${PORT_SEL}" != "" ] && PORTSEL=${PORT_SEL}
|
||||||
echo "HERE: '${PORT_SEL}' - '${PORTSEL}'"
|
|
||||||
if [ "${PORTSEL}" == "" ]; then
|
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_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')
|
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 "(${idsCL[Yellow]}E${idsCL[Default]})xit"
|
||||||
echo -e ""
|
echo -e ""
|
||||||
echo -e "\033[5A"
|
echo -e "\033[5A"
|
||||||
until [ "${PORTSEL}" != "" ]; do
|
# until [ "${PORTSEL}" != "" ]; do
|
||||||
echo -en "\n${idsCL[LightCyan]}Enter the port number to control: ${idsCL[Default]}"
|
echo -en "\n${idsCL[LightCyan]}Enter the port number to control: ${idsCL[Default]}"
|
||||||
read PORTSEL
|
read PORTSEL
|
||||||
echo
|
echo
|
||||||
done
|
# done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ "${PORTSEL^^}" == "E" ] && exit 0
|
[ "${PORTSEL^^}" == "E" ] && exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user