diff options
-rwxr-xr-x | recipes-core/multitech/cell-radio-fwswitch/cell-radio-fwswitch.sh | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/recipes-core/multitech/cell-radio-fwswitch/cell-radio-fwswitch.sh b/recipes-core/multitech/cell-radio-fwswitch/cell-radio-fwswitch.sh index fdf21f0..a101e56 100755 --- a/recipes-core/multitech/cell-radio-fwswitch/cell-radio-fwswitch.sh +++ b/recipes-core/multitech/cell-radio-fwswitch/cell-radio-fwswitch.sh @@ -53,6 +53,12 @@ if [ "$FWACTIVE" == "$FWIMAGE" ]; then exit 0 fi +# Verizon does not want an APN, so remove first +if ((FWIMAGE == 1)) ; then + /usr/sbin/mlinux-switch-apn $FWIMAGE +fi + + # # Switch the firmware # @@ -68,7 +74,12 @@ fi # # This is somewhat dangerous in that we assume the radio # will switch. -[ $TIMEOUT -eq 0 ] && (/usr/sbin/set-apn "$FWIMAGE" || exit 0) +if ((TIMEOUT == 0)) ; then + if ((FWIMAGE == 0)) ; then + echo "Use mlinux-switch-apn to switch the APN when the radio is ready, before dialing" + exit 0 + fi +fi # # Wait for the radio to be ready before continuing @@ -86,7 +97,7 @@ while [ $COUNTER -lt $TIMEOUT ]; do MODEL=$(radio-query --model) if [ $? -eq 0 ]; then echo "Cellular radio firmware has been switched to $FWIMAGE image." - /usr/sbin/mlinux-switch-apn $FWIMAGE + ((FWIMAGE == 0)) && /usr/sbin/mlinux-switch-apn $FWIMAGE exit 0 fi @@ -97,6 +108,7 @@ while [ $COUNTER -lt $TIMEOUT ]; do sleep 1 done -/usr/sbin/mlinux-switch-apn $FWIMAGE echo "Cellular radio is not ready." +echo "When it becomes ready, invoke /usr/sbin/mlinux-switch-apn" +echo "to set the APN" exit 1 |