diff options
author | John Estabrook <jestabro@vyos.io> | 2023-06-27 15:36:12 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2023-06-28 11:52:16 -0500 |
commit | 186d05c3c792ea1c61e8f0e68fd7006917244660 (patch) | |
tree | a700c12c209d310211aed8db02a3c7f4f356e819 /src/op_mode/powerctrl.py | |
parent | 3d006d519ca99b71096d0028a9190e43eaa35f86 (diff) | |
download | vyos-1x-186d05c3c792ea1c61e8f0e68fd7006917244660.tar.gz vyos-1x-186d05c3c792ea1c61e8f0e68fd7006917244660.zip |
T5320: check if unsaved commits are due to boot config error
Diffstat (limited to 'src/op_mode/powerctrl.py')
-rwxr-xr-x | src/op_mode/powerctrl.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/op_mode/powerctrl.py b/src/op_mode/powerctrl.py index 239f766fd..dfacd45c2 100755 --- a/src/op_mode/powerctrl.py +++ b/src/op_mode/powerctrl.py @@ -104,8 +104,9 @@ def cancel_shutdown(): def check_unsaved_config(): from vyos.config_mgmt import unsaved_commits + from vyos.util import boot_configuration_success - if unsaved_commits(): + if unsaved_commits() 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: |