From 3b33e0179180beaffa10a2cfaa08621e18ae0113 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Fri, 11 May 2018 08:30:54 +0200 Subject: [PATCH] net/mwan3: fix indentation Fix indentation. Signed-off-by: Florian Eckert --- net/mwan3/files/usr/sbin/mwan3track | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/net/mwan3/files/usr/sbin/mwan3track b/net/mwan3/files/usr/sbin/mwan3track index c705479047..f445b146e0 100755 --- a/net/mwan3/files/usr/sbin/mwan3track +++ b/net/mwan3/files/usr/sbin/mwan3track @@ -118,18 +118,18 @@ main() { if [ $host_up_count -lt $reliability ]; then case "$track_method" in ping) - if [ $check_quality -eq 0 ]; then - ping -I $DEVICE -c $count -W $timeout -s $size -q $track_ip &> /dev/null - result=$? + if [ $check_quality -eq 0 ]; then + ping -I $DEVICE -c $count -W $timeout -s $size -q $track_ip &> /dev/null + result=$? + else + ping_result="$(ping -I $DEVICE -c $count -W $timeout -s $size -q $track_ip | tail -2)" + loss="$(echo "$ping_result" | grep "packet loss" | cut -d "," -f3 | awk '{print $1}' | sed -e 's/%//')" + if [ "$loss" -eq 100 ]; then + latency=999999 else - ping_result="$(ping -I $DEVICE -c $count -W $timeout -s $size -q $track_ip | tail -2)" - loss="$(echo "$ping_result" | grep "packet loss" | cut -d "," -f3 | awk '{print $1}' | sed -e 's/%//')" - if [ "$loss" -eq 100 ]; then - latency=999999 - else - latency="$(echo "$ping_result" | grep -E 'rtt|round-trip' | cut -d "=" -f2 | cut -d "/" -f2 | cut -d "." -f1)" - fi + latency="$(echo "$ping_result" | grep -E 'rtt|round-trip' | cut -d "=" -f2 | cut -d "/" -f2 | cut -d "." -f1)" fi + fi ;; arping) arping -I $DEVICE -c $count -w $timeout -q $track_ip &> /dev/null -- 2.30.2