mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-18 20:47:55 +00:00
key-init: If time resets, tell user to set it, but allow skipping
The 'warn' message was not very effective, because change-time.sh clears the screen right after. Prompt with whiptail instead, which also lets the user know what's happening before we drop them into a series of prompts. Let the user skip changing time if they really want to. While they usually should set the time, it's rather frustrating if Heads forces them to go through these prompts when they don't want to. Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm> Signed-off-by: Thierry Laurion <insurgo@riseup.net>
This commit is contained in:
parent
cbd1f285c6
commit
62c8366d20
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e -o pipefail
|
||||
. /etc/functions
|
||||
. /etc/gui_functions
|
||||
|
||||
TRACE_FUNC
|
||||
|
||||
@ -9,8 +10,11 @@ TRACE_FUNC
|
||||
# Good system clock is required for GPG to work properly.
|
||||
# if system year is less then 2024, prompt user to set correct time
|
||||
if [ "$(date +%Y)" -lt 2024 ]; then
|
||||
warn "System time is incorrect. Please set the correct time."
|
||||
change-time.sh
|
||||
if whiptail_warning --title "System Time Incorrect" \
|
||||
--yesno "The system time is incorrect. Please set the correct time." \
|
||||
0 80 --yes-button Continue --no-button Skip --clear; then
|
||||
change-time.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
# Import user's keys if they exist
|
||||
|
Loading…
Reference in New Issue
Block a user