net/mwan3: replace legancy backticks
authorFlorian Eckert <redacted>
Fri, 11 May 2018 06:28:57 +0000 (08:28 +0200)
committerFlorian Eckert <redacted>
Fri, 11 May 2018 06:42:53 +0000 (08:42 +0200)
Replace legancy backticks syntax shell execution with braces.

Signed-off-by: Florian Eckert <redacted>
net/mwan3/files/usr/sbin/mwan3track

index 068e9cb14d5ebbe21485b10aa764cbe3f17ee8f0..c705479047d2ce26eb06b57dea46a183d89923c1 100755 (executable)
@@ -122,12 +122,12 @@ main() {
                                                                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/%//'`
+                                                               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`
+                                                                       latency="$(echo "$ping_result" | grep -E 'rtt|round-trip' | cut -d "=" -f2 | cut -d "/" -f2 | cut -d "." -f1)"
                                                                fi      
                                                        fi
                                        ;;
git clone https://git.99rst.org/PROJECT