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

cleaner code

This commit is contained in:
crcro
2016-09-12 12:48:17 +03:00
parent 28cae5cff3
commit d9f36a84b1

View File

@ -33,10 +33,11 @@ done
if [[ "$VER" =~ '4.2.6p5' ]]
then
CMD2=`$BIN_NTPDC -c iostats | $BIN_TR -d ' ' | $BIN_TR '\n' ','`
USECMD=`echo $BIN_NTPDC -c iostats`
else
CMD2=`$BIN_NTPQ -c iostats localhost | $BIN_TR -d ' ' | $BIN_TR '\n' ','`
USECMD=`echo $BIN_NTPQ -c iostats localhost`
fi
CMD2=`$USECMD | $BIN_TR -d ' ' | $BIN_TR '\n' ','`
IFS=',' read -r -a array <<< "$CMD2"