From 90b2e0ca5daf4ff6b862bef2cab9c68541f67664 Mon Sep 17 00:00:00 2001 From: Thierry Laurion Date: Fri, 13 Jan 2023 14:53:11 -0500 Subject: [PATCH] kexec-save-default: do /boot operation in subshell fixes screwed commit 6f6f37ec3a8d7cab1c963ce4e6614f89132aeecf --- initrd/bin/kexec-save-default | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/initrd/bin/kexec-save-default b/initrd/bin/kexec-save-default index 37744211..2e0b3d2a 100755 --- a/initrd/bin/kexec-save-default +++ b/initrd/bin/kexec-save-default @@ -122,9 +122,9 @@ if [ ! -d $paramsdir ]; then fi rm $paramsdir/kexec_default.*.txt 2>/dev/null || true echo "$entry" > $ENTRY_FILE -kexec-boot -b "$bootdir" -e "$entry" -f | \ +( cd $bootdir && kexec-boot -b "$bootdir" -e "$entry" -f| \ xargs sha256sum > $HASH_FILE \ -|| die "Failed to create hashes of boot files" +) || die "Failed to create hashes of boot files" if [ ! -r $ENTRY_FILE -o ! -r $HASH_FILE ]; then die "Failed to write default config" fi