summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-12-04 07:36:39 +0100
committerChristian Poessinger <christian@poessinger.com>2021-12-04 07:39:13 +0100
commit9af7987e851c69f87d3019f4519459239d1848c5 (patch)
treea4bf2949cd7150d8509f3aabb1e59d0f2680b63f /src
parente87a1c8364158d0a40edaa984ccb7606e4243a1a (diff)
downloadvyos-1x-9af7987e851c69f87d3019f4519459239d1848c5.tar.gz
vyos-1x-9af7987e851c69f87d3019f4519459239d1848c5.zip
wwan: T3795: move implementation to VbashOpRun()
After commit ae16a51506c ("configquery: T3402: use vyatta-op-cmd-wrapper to provide environment") we can now call VyOS op-mode commands from arbitrary Python scripts. (cherry picked from commit 4683223c8ffcb10470f7a8a2eb48d57773ac73df)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/helpers/vyos-check-wwan.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/helpers/vyos-check-wwan.py b/src/helpers/vyos-check-wwan.py
index c6e6c54b7..2ff9a574f 100755
--- a/src/helpers/vyos-check-wwan.py
+++ b/src/helpers/vyos-check-wwan.py
@@ -18,7 +18,6 @@ from vyos.configquery import VbashOpRun
from vyos.configquery import ConfigTreeQuery
from vyos.util import is_wwan_connected
-from vyos.util import call
conf = ConfigTreeQuery()
dict = conf.get_config_dict(['interfaces', 'wwan'], key_mangling=('-', '_'),
@@ -30,8 +29,7 @@ for interface, interface_config in dict.items():
# do not restart this interface as it's disabled by the user
continue
- #op = VbashOpRun()
- #op.run(['connect', 'interface', interface])
- call(f'VYOS_TAGNODE_VALUE={interface} /usr/libexec/vyos/conf_mode/interfaces-wwan.py')
+ op = VbashOpRun()
+ op.run(['connect', 'interface', interface])
exit(0)