diff options
-rw-r--r-- | python/vyos/util.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/python/vyos/util.py b/python/vyos/util.py index f3f323c34..0bf6b699e 100644 --- a/python/vyos/util.py +++ b/python/vyos/util.py @@ -989,6 +989,11 @@ def is_wwan_connected(interface): if not interface.startswith('wwan'): raise ValueError(f'Specified interface "{interface}" is not a WWAN interface') + # ModemManager is required for connection(s) - if service is not running, + # there won't be any connection at all! + if not is_systemd_service_active('ModemManager.service'): + return False + modem = interface.lstrip('wwan') tmp = cmd(f'mmcli --modem {modem} --output-json') |