summaryrefslogtreecommitdiff
path: root/src/op_mode/powerctrl.py
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2023-06-29 00:07:47 +0100
committerGitHub <noreply@github.com>2023-06-29 00:07:47 +0100
commit88282bed3b9a91f3a1cd645fee89fe38d8735de6 (patch)
treea700c12c209d310211aed8db02a3c7f4f356e819 /src/op_mode/powerctrl.py
parent6a2ddc478d61db6b177bd7ac49dcff0df9f69db8 (diff)
parent186d05c3c792ea1c61e8f0e68fd7006917244660 (diff)
downloadvyos-1x-88282bed3b9a91f3a1cd645fee89fe38d8735de6.tar.gz
vyos-1x-88282bed3b9a91f3a1cd645fee89fe38d8735de6.zip
Merge pull request #2060 from jestabro/warning-boot-config-err
T5320: warn on entering config mode if boot config errors present
Diffstat (limited to 'src/op_mode/powerctrl.py')
-rwxr-xr-xsrc/op_mode/powerctrl.py3
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: