Merge pull request #1278 from tlaurion/kexec-save-default_fix_subshell_boot_ops

kexec-save-default: do /boot operation in subshell
This commit is contained in:
tlaurion 2023-01-13 14:58:11 -05:00 committed by GitHub
commit febff85498
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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