diff options
author | Thomas Mangin <thomas.mangin@exa.net.uk> | 2020-04-05 17:23:03 +0100 |
---|---|---|
committer | Thomas Mangin <thomas.mangin@exa.net.uk> | 2020-04-06 20:22:35 +0100 |
commit | 928a136b0978411b551a5ae13232dac785daf53f (patch) | |
tree | bfbde2564f25c3e8544777b6e309590e345e147c /src/conf_mode | |
parent | 07401961dd6b391e1a8ee8123d30940811210bfa (diff) | |
download | vyos-1x-928a136b0978411b551a5ae13232dac785daf53f.tar.gz vyos-1x-928a136b0978411b551a5ae13232dac785daf53f.zip |
util: T2226: rewrite wirelessmodem to use cmd
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/interfaces-wirelessmodem.py | 7 |
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') |