mirror of
https://github.com/linuxboot/heads.git
synced 2025-01-29 15:44:07 +00:00
Wrap whiptail text that's over 80 characters
While the whiptail program wraps text appropriately based on column size, the fbwhiptail program doesn't, leading to text that scrolls off the window where it can no longer be read. This change wraps the longer text output so it all fits.
This commit is contained in:
parent
8108e419fe
commit
f26a14c20d
@ -26,7 +26,7 @@ verify_global_hashes()
|
||||
return 0
|
||||
elif [ ! -f $TMP_HASH_FILE ]; then
|
||||
if (whiptail $CONFIG_ERROR_BG_COLOR --clear --title 'ERROR: Missing Hash File!' \
|
||||
--yesno "The file containing hashes for /boot is missing!\n\nIf you are setting this system up for the first time, select Yes to update your list of checksums.\n\nOtherwise this could indicate a compromise and you should select No to return to the main menu.\n\nWould you like to update your checksums now?" 30 80) then
|
||||
--yesno "The file containing hashes for /boot is missing!\n\nIf you are setting this system up for the first time,\nselect Yes to update your list of checksums.\n\nOtherwise this could indicate a compromise\nand you should select No to return to the main menu.\n\nWould you like to update your checksums now?" 30 80) then
|
||||
update_checksums
|
||||
fi
|
||||
return 1
|
||||
@ -36,7 +36,7 @@ verify_global_hashes()
|
||||
# if files changed before package manager started, show stern warning
|
||||
if [ -f "$TMP_PACKAGE_TRIGGER_PRE" ]; then
|
||||
PRE_CHANGED_FILES=$(grep '^CHANGED_FILES' $TMP_PACKAGE_TRIGGER_POST | cut -f 2 -d '=' | tr -d '"')
|
||||
TEXT="The OS logged that the following files failed the verification process BEFORE package updates ran:\n${PRE_CHANGED_FILES}\n\nCompare against the files Heads has detected have changed:\n${CHANGED_FILES}\n\nThis could indicate a compromise!\n\nWould you like to update your checksums anyway?"
|
||||
TEXT="The following files failed the verification process BEFORE package updates ran:\n${PRE_CHANGED_FILES}\n\nCompare against the files Heads has detected have changed:\n${CHANGED_FILES}\n\nThis could indicate a compromise!\n\nWould you like to update your checksums anyway?"
|
||||
|
||||
# if files changed after package manager started, probably caused by package manager
|
||||
elif [ -f "$TMP_PACKAGE_TRIGGER_POST" ]; then
|
||||
@ -105,7 +105,7 @@ while true; do
|
||||
TOTP=`unseal-totp`
|
||||
if [ $? -ne 0 ]; then
|
||||
whiptail $CONFIG_ERROR_BG_COLOR --clear --title "ERROR: TOTP Generation Failed!" \
|
||||
--menu "ERROR: Heads couldn't generate the TOTP code.\n\nIf you have just reflashed your BIOS, you will need to generate a new TOTP secret.\n\nIf you have not just reflashed your BIOS, THIS COULD INDICATE TAMPERING!\n\nIf this is the first time the system has booted, you should reset the TPM and set your own password\n\nHow would you like to proceed?" 30 80 4 \
|
||||
--menu "ERROR: Heads couldn't generate the TOTP code.\n\nIf you have just reflashed your BIOS, you will need to generate a new TOTP secret.\n\nIf you have not just reflashed your BIOS, THIS COULD INDICATE TAMPERING!\n\nIf this is the first time the system has booted,\nyou should reset the TPM and set your own password\n\nHow would you like to proceed?" 30 80 4 \
|
||||
'g' ' Generate new TOTP secret' \
|
||||
'i' ' Ignore error and continue to default boot menu' \
|
||||
'p' ' Reset the TPM' \
|
||||
@ -258,7 +258,7 @@ while true; do
|
||||
|| recovery "Failed default boot"
|
||||
else
|
||||
if (whiptail --title 'No Default Boot Option Configured' \
|
||||
--yesno "There is no default boot option configured yet. Would you like to load a menu of boot options? Otherwise you will return to the main menu." 16 80) then
|
||||
--yesno "There is no default boot option configured yet.\nWould you like to load a menu of boot options?\nOtherwise you will return to the main menu." 16 80) then
|
||||
kexec-select-boot -m -b /boot -c "grub.cfg" -g
|
||||
else
|
||||
echo "Returning to the main menu"
|
||||
|
Loading…
x
Reference in New Issue
Block a user