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=$(ifstatus "${CFG}" | jsonfilter -e "@.up")
|
||||||
|
|
||||||
[ "${IFUP}" = "true" ] && {
|
[ "${IFUP}" = "true" ] && {
|
||||||
logger -t "modemmanager" "interface ${CFG} (network device ${INTERFACE}) ${STATE}"
|
mm_log "info" "Reconnecting '${CFG}' on '${STATE}' event"
|
||||||
proto_init_update $INTERFACE 0
|
ubus call network.interface down "{ 'interface': '${CFG}'}"
|
||||||
proto_send_update $CFG
|
ubus call network.interface up "{ 'interface': '${CFG}'}"
|
||||||
}
|
}
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue