summaryrefslogtreecommitdiff
path: root/src/helpers
diff options
context:
space:
mode:
authorLulu Cathrinus Grimalkin <me@erkin.party>2021-12-16 17:32:24 +0300
committerGitHub <noreply@github.com>2021-12-16 17:32:24 +0300
commit9737a55f6dde490e7fdf1c9d5c5733e48c94d141 (patch)
treed2c24363d921490bcef5cb3efb70ae794fbe22a5 /src/helpers
parent95b91627a6065b720365c9ae7d124d85fc8e493d (diff)
parent55f8ede2d09a9ad095f9ec5c2a729f8c5fb6aafa (diff)
downloadvyos-1x-9737a55f6dde490e7fdf1c9d5c5733e48c94d141.tar.gz
vyos-1x-9737a55f6dde490e7fdf1c9d5c5733e48c94d141.zip
Merge branch 'vyos:current' into current
Diffstat (limited to 'src/helpers')
-rwxr-xr-xsrc/helpers/vyos-boot-config-loader.py4
-rwxr-xr-xsrc/helpers/vyos-check-wwan.py6
-rwxr-xr-xsrc/helpers/vyos_net_name10
3 files changed, 5 insertions, 15 deletions
diff --git a/src/helpers/vyos-boot-config-loader.py b/src/helpers/vyos-boot-config-loader.py
index c5bf22f10..b9cc87bfa 100755
--- a/src/helpers/vyos-boot-config-loader.py
+++ b/src/helpers/vyos-boot-config-loader.py
@@ -23,12 +23,12 @@ import grp
import traceback
from datetime import datetime
-from vyos.defaults import directories
+from vyos.defaults import directories, config_status
from vyos.configsession import ConfigSession, ConfigSessionError
from vyos.configtree import ConfigTree
from vyos.util import cmd
-STATUS_FILE = '/tmp/vyos-config-status'
+STATUS_FILE = config_status
TRACE_FILE = '/tmp/boot-config-trace'
CFG_GROUP = 'vyattacfg'
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)
diff --git a/src/helpers/vyos_net_name b/src/helpers/vyos_net_name
index e21d8c9ff..afeef8f2d 100755
--- a/src/helpers/vyos_net_name
+++ b/src/helpers/vyos_net_name
@@ -25,14 +25,13 @@ from sys import argv
from vyos.configtree import ConfigTree
from vyos.defaults import directories
-from vyos.util import cmd
+from vyos.util import cmd, boot_configuration_complete
vyos_udev_dir = directories['vyos_udev_dir']
vyos_log_dir = '/run/udev/log'
vyos_log_file = os.path.join(vyos_log_dir, 'vyos-net-name')
config_path = '/opt/vyatta/etc/config/config.boot'
-config_status = '/tmp/vyos-config-status'
lock = threading.Lock()
@@ -43,13 +42,6 @@ except FileExistsError:
logging.basicConfig(filename=vyos_log_file, level=logging.DEBUG)
-def boot_configuration_complete() -> bool:
- """ Check if vyos-router has completed, hence hotplug event
- """
- if os.path.isfile(config_status):
- return True
- return False
-
def is_available(intfs: dict, intf_name: str) -> bool:
""" Check if interface name is already assigned
"""