summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2023-09-05 13:46:54 -0500
committerJohn Estabrook <jestabro@vyos.io>2023-09-08 08:40:32 -0500
commit667e968568564811a7dc09049f7a1e38cb879e91 (patch)
treeae66830837767f8908788a76022ede151a8efaab
parentbf287c6ef35fea6d4deb04c88c56a99e9768d36d (diff)
downloadvyos-1x-667e968568564811a7dc09049f7a1e38cb879e91.tar.gz
vyos-1x-667e968568564811a7dc09049f7a1e38cb879e91.zip
config-mgmt: T5353: only add log entry if archiving
(cherry picked from commit 73e317bee57c03b719019daabd578842d912b761)
-rw-r--r--python/vyos/config_mgmt.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/python/vyos/config_mgmt.py b/python/vyos/config_mgmt.py
index 0fc72e660..996475eb8 100644
--- a/python/vyos/config_mgmt.py
+++ b/python/vyos/config_mgmt.py
@@ -200,9 +200,9 @@ Proceed ?'''
raise ConfigMgmtError(out)
entry = self._read_tmp_log_entry()
- self._add_log_entry(**entry)
if self._archive_active_config():
+ self._add_log_entry(**entry)
self._update_archive()
msg = 'Reboot timer stopped'
@@ -334,10 +334,10 @@ Proceed ?'''
user = self._get_user()
via = 'init'
comment = ''
- self._add_log_entry(user, via, comment)
# add empty init config before boot-config load for revision
# and diff consistency
if self._archive_active_config():
+ self._add_log_entry(user, via, comment)
self._update_archive()
os.umask(mask)
@@ -352,9 +352,8 @@ Proceed ?'''
self._new_log_entry(tmp_file=tmp_log_entry)
return
- self._add_log_entry()
-
if self._archive_active_config():
+ self._add_log_entry()
self._update_archive()
def commit_archive(self):