io386: replace check for io386 to call lock_chip by a single common call from kexec-boot prior of real kexec

This commit is contained in:
Thierry Laurion 2023-04-12 15:04:05 -04:00
parent 3f1c76ce11
commit 699a961381
No known key found for this signature in database
GPG Key ID: E7B4A71658E36A93
2 changed files with 4 additions and 11 deletions

View File

@ -41,18 +41,12 @@ while true; do
fi
if [ "$totp_confirm" = "u" ]; then
if [ "$CONFIG_IO386" = y ]; then
lock_chip
fi
exec /bin/usb-init
continue
fi
if [ "$totp_confirm" = "m" ]; then
# Try to select a kernel from the menu
if [ "$CONFIG_IO386" = y ]; then
lock_chip
fi
mount_boot
kexec-select-boot -m -b /boot -c "grub.cfg"
continue
@ -60,16 +54,11 @@ while true; do
if [ "$totp_confirm" = "y" -o -n "$totp_confirm" ]; then
# Try to boot the default
if [ "$CONFIG_IO386" = y ]; then
lock_chip
fi
mount_boot
kexec-select-boot -b /boot -c "grub.cfg" \
|| recovery "Failed default boot"
fi
done
recovery "Something failed during boot"

View File

@ -150,5 +150,9 @@ if [ "$CONFIG_TPM" = "y" ]; then
tpmr kexec_finalize
fi
if [ -x /bin/io386 ]; then
lock_chip
fi
echo "Starting the new kernel"
exec kexec -e