Merge pull request #23590 from TDT-AG/pr/20240305-modemmanager
modemmanager: reconnect interface if the modemmanager detects a disconnect
This commit is contained in:
commit
26117ac9b1
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue