diff options
author | Andrew Topp <andrewt@telekinetica.net> | 2024-06-19 09:48:45 +1000 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-06-21 02:48:45 +0000 |
commit | 5e88f15b16d39213f349c3a7b4f1030a1399f1cb (patch) | |
tree | e1a1b9b25d7403fdd8cc7b01e6a1cd537ff8702e /src | |
parent | 1fc32e342dc053e54e658e3a0d72bdc340ddb9d6 (diff) | |
download | vyos-1x-5e88f15b16d39213f349c3a7b4f1030a1399f1cb.tar.gz vyos-1x-5e88f15b16d39213f349c3a7b4f1030a1399f1cb.zip |
op-mode: T5514: Allow safe reboots to config defaults when config.boot is deleted
* Added flag to vyos.config_mgmt.unsaved_commits() that will tolerate missing config.boot for specific circumstances
* Shutdown/reboot uses this flag; config will regenerate from defaults after a reboot
(cherry picked from commit 8281383a09f12da20a1c9b4864b38ac3f541b48f)
Diffstat (limited to 'src')
-rwxr-xr-x | src/op_mode/powerctrl.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/op_mode/powerctrl.py b/src/op_mode/powerctrl.py index 6c8f802b5..cb4a175dd 100755 --- a/src/op_mode/powerctrl.py +++ b/src/op_mode/powerctrl.py @@ -110,7 +110,7 @@ def check_unsaved_config(): from vyos.config_mgmt import unsaved_commits from vyos.utils.boot import boot_configuration_success - if unsaved_commits() and boot_configuration_success(): + if unsaved_commits(allow_missing_config=True) and boot_configuration_success(): print("Warning: there are unsaved configuration changes!") print("Run 'save' command if you do not want to lose those changes after reboot/shutdown.") else: |