uqmi: wait for the control device too
[openwrt/.git] / package / network / utils / uqmi / files / lib / netifd / proto / qmi.sh
index 38d83ace5fcc5db23d5eeb8002d03b17984ce0a2..05055b14842571aa1e4a2804b5896f1d273313e6 100755 (executable)
@@ -44,6 +44,8 @@ proto_qmi_setup() {
                return 1
        }
 
+       [ -n "$delay" ] && sleep "$delay"
+
        device="$(readlink -f $device)"
        [ -c "$device" ] || {
                echo "The specified control device does not exist"
@@ -62,8 +64,6 @@ proto_qmi_setup() {
                return 1
        }
 
-       [ -n "$delay" ] && sleep "$delay"
-
        while uqmi -s -d "$device" --get-pin-status | grep '"UIM uninitialized"' > /dev/null; do
                [ -e "$device" ] || return 1
                sleep 1;