summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Mangin <thomas.mangin@exa.net.uk>2020-04-05 17:23:03 +0100
committerThomas Mangin <thomas.mangin@exa.net.uk>2020-04-06 20:22:35 +0100
commit928a136b0978411b551a5ae13232dac785daf53f (patch)
treebfbde2564f25c3e8544777b6e309590e345e147c /src
parent07401961dd6b391e1a8ee8123d30940811210bfa (diff)
downloadvyos-1x-928a136b0978411b551a5ae13232dac785daf53f.tar.gz
vyos-1x-928a136b0978411b551a5ae13232dac785daf53f.zip
util: T2226: rewrite wirelessmodem to use cmd
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/interfaces-wirelessmodem.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/conf_mode/interfaces-wirelessmodem.py b/src/conf_mode/interfaces-wirelessmodem.py
index 4df459768..5e10cfce7 100755
--- a/src/conf_mode/interfaces-wirelessmodem.py
+++ b/src/conf_mode/interfaces-wirelessmodem.py
@@ -156,8 +156,7 @@ def generate(wwan):
os.mkdir(dirname)
# Always hang-up WWAN connection prior generating new configuration file
- cmd = f'systemctl stop ppp@{intf}.service'
- subprocess_cmd(cmd)
+ cmd(f'systemctl stop ppp@{intf}.service')
if wwan['deleted']:
# Delete PPP configuration files
@@ -211,9 +210,7 @@ def apply(wwan):
if not wwan['disable']:
# "dial" WWAN connection
intf = wwan['intf']
- cmd = f'systemctl start ppp@{intf}.service'
- subprocess_cmd(cmd)
-
+ cmd(f'systemctl start ppp@{intf}.service')
# make logfile owned by root / vyattacfg
chown_file(wwan['logfile'], 'root', 'vyattacfg')