mirror of
https://github.com/linuxboot/heads.git
synced 2025-02-20 09:16:21 +00:00
functions: fix handling of checksum update fail
If kexec-sign-config fails due to GPG key not present, the double die() results in a kernel panic (and if it didn't, /boot would be left mounted RW). Fix this by removing call to die() and ensuring /boot remounted RO regardless checksum update success or failure. Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
This commit is contained in:
parent
018279b2bf
commit
4d32b4adf8
@ -287,8 +287,10 @@ update_checksums()
|
||||
if [ "$CONFIG_TPM" = "y" ]; then
|
||||
extparam=-u
|
||||
fi
|
||||
kexec-sign-config -p /boot $extparam \
|
||||
|| die "Failed to sign default config"
|
||||
if ! kexec-sign-config -p /boot $extparam ; then
|
||||
echo "Failed to sign default config; press Enter to continue."
|
||||
read
|
||||
fi
|
||||
|
||||
# switch back to ro mode
|
||||
mount -o ro,remount /boot
|
||||
|
Loading…
x
Reference in New Issue
Block a user