kexec-boot: display kexec command to be executed in DEBUG mode and permit to abort call.

This commit is contained in:
Thierry Laurion 2023-07-07 14:16:46 -04:00
parent 3747d58510
commit d9a2b17dec
No known key found for this signature in database
GPG Key ID: E7B4A71658E36A93

View File

@ -146,6 +146,17 @@ echo "$kexeccmd"
eval "$kexeccmd" \
|| die "Failed to load the new kernel"
if [ "$CONFIG_DEBUG_OUTPUT" = "y" ];then
#Repeat kexec command that will be executed since in debug
DEBUG "kexeccmd= $kexeccmd"
read -n 1 -p "[DEBUG] Continue booting? [Y/n]: " debug_boot_confirm
if [ "${debug_boot_confirm^^}" = N ]; then
# abort
die "Boot aborted"
fi
fi
if [ "$CONFIG_TPM" = "y" ]; then
tpmr kexec_finalize
fi