Merge pull request #23590 from TDT-AG/pr/20240305-modemmanager

modemmanager: reconnect interface if the modemmanager detects a disconnect
This commit is contained in:
Florian Eckert 2024-03-12 11:59:11 +01:00 committed by GitHub
commit 26117ac9b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -31,9 +31,9 @@ CFG=$(mm_get_modem_config "${MODEM_DEVICE}")
IFUP=$(ifstatus "${CFG}" | jsonfilter -e "@.up")
[ "${IFUP}" = "true" ] && {
logger -t "modemmanager" "interface ${CFG} (network device ${INTERFACE}) ${STATE}"
proto_init_update $INTERFACE 0
proto_send_update $CFG
mm_log "info" "Reconnecting '${CFG}' on '${STATE}' event"
ubus call network.interface down "{ 'interface': '${CFG}'}"
ubus call network.interface up "{ 'interface': '${CFG}'}"
}
exit 0