kexec-select-boot: use 'fold' to wrap kernel args at 80 char

Prevents truncation via fbwhiptail window

Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
This commit is contained in:
Matt DeVillier 2022-04-07 14:30:56 -05:00
parent 025f914eb3
commit ba054b15c3
No known key found for this signature in database
GPG Key ID: 2BBB776A35B978FD

View File

@ -137,7 +137,7 @@ confirm_menu_option() {
default_text="Make default"
[[ "$CONFIG_TPM_NO_LUKS_DISK_UNLOCK" = "y" ]] && default_text="${default_text} and boot"
whiptail $BG_COLOR_WARNING --clear --title "Confirm boot details" \
--menu "Confirm the boot details for $name:\n\n$kernel \n\n" 20 120 8 \
Confirm the boot details for $name:\n\n$(echo $kernel| fold -s -w 80) \n\n" 20 120 8 \
-- 'd' "${default_text}" 'y' "Boot one time" \
2>/tmp/whiptail || die "Aborting boot attempt"