Skip to content
Snippets Groups Projects
Commit 09c658f5 authored by Anis Ellouze's avatar Anis Ellouze
Browse files

#0000152: ipping diagnostic does not work properly in Ubuntu

parent 40ba7a18
No related branches found
No related tags found
No related merge requests found
......@@ -33,9 +33,11 @@ ipping_launch() {
res=$(ping -q -c 1 -s $dsize -W $timeout $host 2>&1)
ba=`echo "$res" | grep "bad address"`
[ -n "$ba" ] && { $UCI_SET_VARSTATE easycwmp.@local[0].DiagnosticsState=Error_CannotResolveHostName; return; }
stc=`echo "$res" | grep "packets received"`
ba=`echo "$res" | grep "unknown host"`
[ -n "$ba" ] && { $UCI_SET_VARSTATE easycwmp.@local[0].DiagnosticsState=Error_CannotResolveHostName; return; }
stc=`echo "$res" | grep "received"`
[ -z "$stc" ] && { $UCI_SET_VARSTATE easycwmp.@local[0].DiagnosticsState=Error_Other; return; }
times=`echo "$res" | grep "round-trip"`
times=`echo "$res" | grep "min/avg/max"`
[ -z "$times" ] && continue
sc1=`echo $stc | awk '{print $4}'`
sc1=${sc1:-0}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment