mirror of
https://github.com/linuxboot/heads.git
synced 2025-01-30 16:14:01 +00:00
initrd: assert_signable: use recovery() instead of die()
and display some more information to the user, if available
This commit is contained in:
parent
c65d6b92c0
commit
2ae7f53e04
@ -410,7 +410,10 @@ assert_signable() {
|
|||||||
local del='\001-\037\134\177-\377'
|
local del='\001-\037\134\177-\377'
|
||||||
LC_ALL=C tr -d "$del" < /tmp/signable.ref > /tmp/signable.del || die "Failed to execute tr."
|
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
|
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
|
fi
|
||||||
rm -f /tmp/signable.*
|
rm -f /tmp/signable.*
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user