}
}
else
- . /usr/share/libubox/jshn.sh
- json_load "$(uqmi -s -d "$device" --get-pin-status)" 2>&1 | grep -q Failed &&
- json_load "$(uqmi -s -d "$device" --uim-get-sim-state)"
+ json_load "$(uqmi -s -d "$device" --get-pin-status)"
json_get_var pin1_status pin1_status
+ if [ -z "$pin1_status" ]; then
+ json_load "$(uqmi -s -d "$device" --uim-get-sim-state)"
+ json_get_var pin1_status pin1_status
+ fi
json_get_var pin1_verify_tries pin1_verify_tries
case "$pin1_status" in
return 1
;;
esac
+ json_cleanup
fi
if [ -n "$plmn" ]; then
echo "Starting network $interface"
- pdptype=$(echo "$pdptype" | awk '{print tolower($0)}')
+ pdptype="$(echo "$pdptype" | awk '{print tolower($0)}')"
+
[ "$pdptype" = "ip" -o "$pdptype" = "ipv6" -o "$pdptype" = "ipv4v6" ] || pdptype="ip"
if [ "$pdptype" = "ip" ]; then