mwan3: fix shellcheck warning SC2166
authorFlorian Eckert <fe@dev.tdt.de>
Tue, 14 Jul 2020 09:47:15 +0000 (11:47 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Wed, 15 Jul 2020 08:21:54 +0000 (10:21 +0200)
Replace -o boolean check with ||.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
net/mwan3/files/lib/mwan3/mwan3.sh

index 3c4f25cc4018142061aa19b018e1ad1a9739958c..6c8e5008005bad1e57e0b92d0b3bbdc4a2b6069e 100644 (file)
@@ -1067,7 +1067,7 @@ mwan3_report_iface_status()
                IPT="$IPT6"
        fi
 
-       if [ -z "$id" -o -z "$device" ]; then
+       if [ -z "$id" ] || [ -z "$device" ]; then
                result="offline"
        elif [ -n "$($IP rule | awk '$1 == "'$(($id+1000)):'"')" ] && \
                [ -n "$($IP rule | awk '$1 == "'$(($id+2000)):'"')" ] && \