File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 4747from vyos .utils .process import is_systemd_service_active
4848from vyos .utils .process import rc_cmd
4949from vyos .defaults import DEFAULT_COMMIT_CONFIRM_MINUTES
50+ from vyos .component_version import append_system_version
5051
5152SAVE_CONFIG = '/usr/libexec/vyos/vyos-save-config.py'
5253config_json = '/run/vyatta/config/config.json'
@@ -609,14 +610,16 @@ def _add_logrotate_conf(self):
609610 conf_file .chmod (0o644 )
610611
611612 def _archive_active_config (self ) -> bool :
612- save_to_tmp = boot_configuration_complete () or not os .path .isfile (
613- archive_config_file
614- )
613+ # on first boot/fresh install, add baseline archive_config_file
614+ if not os .path .exists (archive_config_file ):
615+ append_system_version (archive_config_file )
616+
615617 mask = os .umask (0o113 )
616618
617619 ext = os .getpid ()
618620 cmp_saved = f'/tmp/config.boot.{ ext } '
619- if save_to_tmp :
621+
622+ if boot_configuration_complete ():
620623 save_config (cmp_saved , json_out = config_json )
621624 else :
622625 copy (config_file , cmp_saved )
You can’t perform that action at this time.
0 commit comments