1
0
mirror of https://github.com/librenms/librenms-agent.git synced 2024-05-09 09:54:52 +00:00

better handling default case

This commit is contained in:
crcro
2016-09-12 11:52:13 +03:00
parent aeecb1621c
commit 28cae5cff3

View File

@@ -31,11 +31,11 @@ do
echo ${array["$value"]} | $BIN_CUT -d "=" -f 2
done
if [[ "$VER" =~ '4.2.8p8' ]]
if [[ "$VER" =~ '4.2.6p5' ]]
then
CMD2=`$BIN_NTPQ -c iostats localhost | $BIN_TR -d ' ' | $BIN_TR '\n' ','`
else
CMD2=`$BIN_NTPDC -c iostats | $BIN_TR -d ' ' | $BIN_TR '\n' ','`
else
CMD2=`$BIN_NTPQ -c iostats localhost | $BIN_TR -d ' ' | $BIN_TR '\n' ','`
fi
IFS=',' read -r -a array <<< "$CMD2"