diff options
Diffstat (limited to 'src/etc/inc/rrd.inc')
-rw-r--r-- | src/etc/inc/rrd.inc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/etc/inc/rrd.inc b/src/etc/inc/rrd.inc index 0d0715b..3daa273 100644 --- a/src/etc/inc/rrd.inc +++ b/src/etc/inc/rrd.inc @@ -984,14 +984,14 @@ for sock in {$g['varrun_path']}/dpinger_*.sock; do continue fi - gw=\$(/usr/bin/nc -U \$sock | awk '{ print \$1 }') - - if [ -z "\$gw" ]; then + t=\$(/usr/bin/nc -U \$sock) + if [ -z "\$t" ]; then continue fi - delay=\$(/usr/bin/nc -U \$sock | awk '{ print \$2 }') - loss=\$(/usr/bin/nc -U \$sock | awk '{ print \$4 }') + gw=\$(echo "\$t" | awk '{ print \$1 }') + delay=\$(echo "\$t" | awk '{ print \$2 }') + loss=\$(echo "\$t" | awk '{ print \$4 }') if echo "\$loss" | grep -Eqv '^[0-9]+\$'; then loss="U" |