diff --git a/net/modemmanager/files/lib/netifd/proto/modemmanager.sh b/net/modemmanager/files/lib/netifd/proto/modemmanager.sh index 295f776744..f5f91c0eae 100644 --- a/net/modemmanager/files/lib/netifd/proto/modemmanager.sh +++ b/net/modemmanager/files/lib/netifd/proto/modemmanager.sh @@ -644,12 +644,6 @@ proto_modemmanager_setup() { [ "$?" -ne "0" ] && return 1 } - [ -z "${plmn}" ] || { - echo "starting network registration with plmn '${plmn}'..." - modemmanager_set_plmn "$device" "$interface" "$plmn" "$force_connection" - [ "$?" -ne "0" ] && return 1 - } - if [ -z "${allowedmode}" ]; then modemmanager_set_allowed_mode "$device" "$interface" "any" else @@ -679,6 +673,12 @@ proto_modemmanager_setup() { [ "$?" -ne "0" ] && return 1 fi + [ -z "${plmn}" ] || { + echo "starting network registration with plmn '${plmn}'..." + modemmanager_set_plmn "$device" "$interface" "$plmn" "$force_connection" + [ "$?" -ne "0" ] && return 1 + } + # setup connect args; APN mandatory (even if it may be empty) echo "starting connection with apn '${apn}'..."