Commit ed94b0bc by jajapi

fixed bonding check function 2

parent 880b731c
Showing with 3 additions and 2 deletions
......@@ -146,13 +146,14 @@ function CHECK_BONDING() # YB Bonding Check function
echo -e "\n------------ Bonding Down Check --------------"
BONDNAME=("bond0" "bond1" "bond2" "bond3" "bond4" "bond5") # BONDNAME 배열에 값(bond0 ~ bond5) 저장
for arr_BOND in $(BONDNAME[*]) # 배열에 저장된 값을 한번씩 사용하는 반복문
for arr_BOND in ${BONDNAME[*]} # 배열에 저장된 값을 한번씩 사용하는 반복문
do
echo -e "\033[41m"$arr_BOND"\033[0m"
cat /proc/net/bonding/$arr_BOND |sed 's/\(Slave Interface.*\)/\x1b[32m\1\x1b[0m/'|sed 's/\( up\)/\x1b[34m\1\x1b[0m/'|sed 's/\( down\)/\x1b[31m\1\x1b[0m/' |sed 's/\(1000\)/\x1b[36m\1\x1b[0m/'|sed 's/\(10000\)/\x1b[36m\1\x1b[0m/'
DRAW_A_LINE()
DRAW_A_LINE
done
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment