diff options
author | John Estabrook <jestabro@vyos.io> | 2021-12-09 12:34:10 -0600 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2021-12-09 12:34:10 -0600 |
commit | 9e34d2761e7d88d49782b94c0b1a0f5de3029546 (patch) | |
tree | 8e29b2c1b1975d67aa6417e7b9683c16b61bd275 /src | |
parent | f168e409acb314d1c15a4343643be7c07ce79b44 (diff) | |
download | vyos-1x-9e34d2761e7d88d49782b94c0b1a0f5de3029546.tar.gz vyos-1x-9e34d2761e7d88d49782b94c0b1a0f5de3029546.zip |
vyos.util: T4061: add function to check for completion of boot config
Diffstat (limited to 'src')
-rwxr-xr-x | src/helpers/vyos-boot-config-loader.py | 4 | ||||
-rwxr-xr-x | src/services/vyos-configd | 3 |
2 files changed, 4 insertions, 3 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/services/vyos-configd b/src/services/vyos-configd index 670b6e66a..2d18589ef 100755 --- a/src/services/vyos-configd +++ b/src/services/vyos-configd @@ -28,6 +28,7 @@ import zmq from contextlib import contextmanager from vyos.defaults import directories +from vyos.util import boot_config_complete from vyos.configsource import ConfigSourceString, ConfigSourceError from vyos.config import Config from vyos import ConfigError @@ -186,7 +187,7 @@ def initialization(socket): session_out = None # if not a 'live' session, for example on boot, write to file - if not session_out or not os.path.isfile('/tmp/vyos-config-status'): + if not session_out or not boot_config_complete(): session_out = script_stdout_log session_mode = 'a' |