summaryrefslogtreecommitdiff
path: root/python/vyos/configsource.py
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2021-12-08 13:29:46 -0600
committerJohn Estabrook <jestabro@vyos.io>2021-12-08 13:30:38 -0600
commite6b1c1f572068535ea99ee39a2d66bd6bf7043d5 (patch)
tree13730bb126a5ead223620b879cfd354509001ecf /python/vyos/configsource.py
parentbcfe967f607a83192d75c01e7f414655891eec60 (diff)
downloadvyos-1x-e6b1c1f572068535ea99ee39a2d66bd6bf7043d5.tar.gz
vyos-1x-e6b1c1f572068535ea99ee39a2d66bd6bf7043d5.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.py3
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: