mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-18 20:47:55 +00:00
gui-init: add Power Off to the Main Boot Menu
Add a main boot menu entry to power off. This enables users to only verify the firmware integrity using OTP, and do nothing more. After having left the device out of sight, one might want to do a quick sanity check only. Since we already have a script to safely power down, we make use of it now.
This commit is contained in:
parent
eb31354085
commit
fbe39745b4
@ -175,6 +175,7 @@ while true; do
|
||||
--menu "$date\nTOTP: $TOTP | HOTP: $HOTP" 20 90 10 \
|
||||
'y' ' Default boot' \
|
||||
'a' ' Advanced Settings -->' \
|
||||
'P' ' Power Off' \
|
||||
'x' ' Exit to recovery shell' \
|
||||
2>/tmp/whiptail || recovery "GUI menu failed"
|
||||
|
||||
@ -330,6 +331,10 @@ while true; do
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ "$totp_confirm" = "P" ]; then
|
||||
poweroff
|
||||
fi
|
||||
|
||||
if [ "$totp_confirm" = "y" -o -n "$totp_confirm" ]; then
|
||||
# Try to boot the default
|
||||
mount_boot
|
||||
|
Loading…
Reference in New Issue
Block a user