diff mbox series

[LEDE-DEV,5/9] uqmi: silence error on pin verification

Message ID 1518704164-22198-6-git-send-email-koen.vandeputte@ncentric.com
State Accepted
Delegated to: John Crispin
Headers show
Series uqmi: Add raw-ip mode support for 17.01 branch | expand

Commit Message

Koen Vandeputte Feb. 15, 2018, 2:16 p.m. UTC
If a device only supports the 2nd verification method (uim),
the first method will fail as expected reporting an error:

"Command not supported"

Silence both separate methods and only report an error regarding
pin verification if both fail.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
---
 package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
index 9a534d4b96d7..1619c2b35eb9 100755
--- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
+++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
@@ -70,7 +70,7 @@  proto_qmi_setup() {
 	done
 
 	[ -n "$pincode" ] && {
-		uqmi -s -d "$device" --verify-pin1 "$pincode" || uqmi -s -d "$device" --uim-verify-pin1 "$pincode" || {
+		uqmi -s -d "$device" --verify-pin1 "$pincode" > /dev/null || uqmi -s -d "$device" --uim-verify-pin1 "$pincode" > /dev/null || {
 			echo "Unable to verify PIN"
 			proto_notify_error "$interface" PIN_FAILED
 			proto_block_restart "$interface"