Merge pull request #1579 from JonathonHall-Purism/seal-hotpkey-error

initrd/bin/seal-hotpkey: Show error if /boot can't be mounted
This commit is contained in:
tlaurion 2024-01-09 14:49:15 -05:00 committed by GitHub
commit 4ece1a1fe4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,9 +11,12 @@ mount_boot()
{
TRACE "Under /bin/seal-hotpkey:mount_boot"
# Mount local disk if it is not already mounted
if ! grep -q /boot /proc/mounts ; then
mount -o ro /boot \
|| recovery "Unable to mount /boot"
if ! grep -q /boot /proc/mounts; then
if ! mount -o ro /boot; then
whiptail $BG_COLOR_ERROR --title 'ERROR' \
--msgbox "Couldn't mount /boot.\n\nCheck the /boot device in configuration settings, or perform an OEM reset." 0 80
return 1
fi
fi
}
@ -45,7 +48,7 @@ fi
# Store counter in file instead of TPM for now, as it conflicts with Heads
# config TPM counter as TPM 1.2 can only increment one counter between reboots
# get current value of HOTP counter in TPM, create if absent
mount_boot
mount_boot || exit 1
#check_tpm_counter $HOTP_COUNTER hotp \
#|| die "Unable to find/create TPM counter"