From 35916d942b6538acb27b29d217e694be36333a97 Mon Sep 17 00:00:00 2001 From: Kyle Rankin Date: Tue, 20 Mar 2018 11:26:09 -0700 Subject: [PATCH] Handle signing failures more gracefully with a dialog --- initrd/bin/gui-init | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/initrd/bin/gui-init b/initrd/bin/gui-init index 9abf73d5..1e35a9fd 100755 --- a/initrd/bin/gui-init +++ b/initrd/bin/gui-init @@ -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