mirror of
https://github.com/linuxboot/heads.git
synced 2025-03-11 06:54:07 +00:00
initrd: speed up non-GUI booting
by not generating the kexec_tree diff in that case
This commit is contained in:
parent
f52466edbf
commit
e368c3f6ea
@ -52,7 +52,7 @@ verify_global_hashes()
|
||||
{
|
||||
echo "+++ Checking verified boot hash file "
|
||||
# Check the hashes of all the files
|
||||
if verify_checksums "$bootdir" ; then
|
||||
if verify_checksums "$bootdir" "$gui_menu" ; then
|
||||
echo "+++ Verified boot hashes "
|
||||
valid_hash='y'
|
||||
valid_global_hash='y'
|
||||
|
@ -400,6 +400,7 @@ escape_zero() {
|
||||
verify_checksums()
|
||||
{
|
||||
local boot_dir="$1"
|
||||
local gui="${2:-y}"
|
||||
|
||||
(
|
||||
set +e -o pipefail
|
||||
@ -412,6 +413,7 @@ verify_checksums()
|
||||
print_tree > /tmp/tree_output || ret=1
|
||||
if ! cmp -s "$TMP_TREE_FILE" /tmp/tree_output &> /dev/null ; then
|
||||
ret=1
|
||||
[[ "$gui" != "y" ]] && exit "$ret"
|
||||
# produce a diff that can safely be presented to the user
|
||||
# this is relatively hard as file names may e.g. contain backslashes etc.,
|
||||
# which are interpreted by whiptail, less, ...
|
||||
|
Loading…
x
Reference in New Issue
Block a user