From 2ae7f53e0406716c9e6a9dc8f130455d84a62bf8 Mon Sep 17 00:00:00 2001 From: 3hhh Date: Sat, 14 Jan 2023 10:27:42 +0100 Subject: [PATCH] initrd: assert_signable: use recovery() instead of die() and display some more information to the user, if available --- initrd/etc/functions | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/initrd/etc/functions b/initrd/etc/functions index 530ae59d..1e61aea4 100755 --- a/initrd/etc/functions +++ b/initrd/etc/functions @@ -410,7 +410,10 @@ assert_signable() { local del='\001-\037\134\177-\377' LC_ALL=C tr -d "$del" < /tmp/signable.ref > /tmp/signable.del || die "Failed to execute tr." if ! cmp -s "/tmp/signable.ref" "/tmp/signable.del" &> /dev/null ; then - die "Some /boot file names contain characters that are currently not supported by heads: $del"$'\n'"Please investigate!" + local user_out="/tmp/hash_output_mismatches" + local add="Please investigate!" + [ -f "$user_out" ] && add="Please investigate the following relative paths to /boot (where # are sanitized invalid characters):"$'\n'"$(cat "$user_out")" + recovery "Some /boot file names contain characters that are currently not supported by heads: $del"$'\n'"$add" fi rm -f /tmp/signable.* }