summaryrefslogtreecommitdiff
path: root/python/vyos/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/vyos/util.py')
-rw-r--r--python/vyos/util.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/python/vyos/util.py b/python/vyos/util.py
index f3f323c34..de55e108b 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')
@@ -1019,7 +1024,3 @@ def sysctl_write(name, value):
call(f'sysctl -wq {name}={value}')
return True
return False
-
-def is_ipv6_enabled() -> bool:
- """ Check if IPv6 support on the system is enabled or not """
- return (sysctl_read('net.ipv6.conf.all.disable_ipv6') == '0')