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 /python/vyos/configsource.py | |
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 'python/vyos/configsource.py')
-rw-r--r-- | python/vyos/configsource.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/vyos/configsource.py b/python/vyos/configsource.py index b0981d25e..a0f6a46b5 100644 --- a/python/vyos/configsource.py +++ b/python/vyos/configsource.py @@ -19,6 +19,7 @@ import re import subprocess from vyos.configtree import ConfigTree +from vyos.util import boot_configuration_complete class VyOSError(Exception): """ @@ -117,7 +118,7 @@ class ConfigSourceSession(ConfigSource): # Running config can be obtained either from op or conf mode, it always succeeds # once the config system is initialized during boot; # before initialization, set to empty string - if os.path.isfile('/tmp/vyos-config-status'): + if boot_configuration_complete(): try: running_config_text = self._run([self._cli_shell_api, '--show-active-only', '--show-show-defaults', '--show-ignore-edit', 'showConfig']) except VyOSError: |