kexec-save-default: do /boot operation in subshell

fixes screwed commit 6f6f37ec3a
This commit is contained in:
Thierry Laurion 2023-01-13 14:53:11 -05:00
parent 1236cbc29e
commit 90b2e0ca5d
No known key found for this signature in database
GPG Key ID: E7B4A71658E36A93

View File

@ -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