Handle signing failures more gracefully with a dialog

This commit is contained in:
Kyle Rankin 2018-03-20 11:26:09 -07:00
parent 769f6a7a24
commit 35916d942b
No known key found for this signature in database
GPG Key ID: 555577116BFA74B9

View File

@ -171,13 +171,16 @@ while true; do
if [ "$CONFIG_TPM" = "y" ]; then
extparam=-u
fi
kexec-sign-config -p /boot $extparam \
|| die "Failed to sign default config"
# switch back to ro mode
mount -o ro,remount /boot
else
echo "Returning to the main menu"
kexec-sign-config -p /boot $extparam
if [ $? -ne 0 ]; then
mount -o ro,remount /boot
whiptail --title 'ERROR: Signing Failed' \
--msgbox "The signing process failed!\n\nReturning to main menu." 16 60
else
# switch back to ro mode
mount -o ro,remount /boot
fi
fi
continue
fi