network/uqmi: pipe the output off qmi_wds_stop to /dev/null
authorFlorian Eckert <fe@dev.tdt.de>
Fri, 8 Sep 2017 11:11:07 +0000 (13:11 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 19 Apr 2018 12:39:38 +0000 (14:39 +0200)
Pipe uqmi output from qmi_wds_stop function into /dev/null.
This will supress the following output in proto teardown.

netifd: wwan (x): "No effect"
netifd: wwan (x): Command failed: Permission denied

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh

index 46ea134182e3a9e12b885f1eb72ab7982516efc0..38d83ace5fcc5db23d5eeb8002d03b17984ce0a2 100755 (executable)
@@ -279,10 +279,15 @@ qmi_wds_stop() {
 
        uqmi -s -d "$device" --set-client-id wds,"$cid" \
                --stop-network 0xffffffff \
-               --autoconnect > /dev/null
+               --autoconnect > /dev/null 2>&1
 
-       [ -n "$pdh" ] && uqmi -s -d "$device" --set-client-id wds,"$cid" --stop-network "$pdh"
-       uqmi -s -d "$device" --set-client-id wds,"$cid" --release-client-id wds
+       [ -n "$pdh" ] && {
+               uqmi -s -d "$device" --set-client-id wds,"$cid" \
+                       --stop-network "$pdh" > /dev/null 2>&1
+       }
+
+       uqmi -s -d "$device" --set-client-id wds,"$cid" \
+               --release-client-id wds > /dev/null 2>&1
 }
 
 proto_qmi_teardown() {