diff options
author | Daniil Baturin <daniil@vyos.io> | 2022-04-08 17:50:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-08 17:50:58 +0300 |
commit | bd50d51f1e49724c9a01e9ce5c0aefa04ec3e913 (patch) | |
tree | 14ac39549f039921ad67dd02448be2dbeb805a97 /python/vyos/util.py | |
parent | 298ce87e8fc444cd42ec10a43a2eb446b71febd6 (diff) | |
parent | e5f1df1988a16d683b72a99bbf9c37305131c49e (diff) | |
download | vyos-1x-bd50d51f1e49724c9a01e9ce5c0aefa04ec3e913.tar.gz vyos-1x-bd50d51f1e49724c9a01e9ce5c0aefa04ec3e913.zip |
Merge pull request #1263 from c-po/wwan-t4324-equuleus
T4324, T4338, T4339 WWAN interface bugfixes
Diffstat (limited to 'python/vyos/util.py')
-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 4283e604c..554614b30 100644 --- a/python/vyos/util.py +++ b/python/vyos/util.py @@ -797,6 +797,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') |