Skip to content

Commit 8ed7b64

Browse files
authored
Merge pull request #42 from hallyn/2023-08-28/savepcr7
Don't overwrite the saved pcr7.bin
2 parents abf22e5 + 5941d91 commit 8ed7b64

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

layers/build-krd/dracut/soci/soci-settled.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,9 @@ soci_udev_settled() {
228228
soci_info "Preinstall completed"
229229
;;
230230
provision)
231-
soci_log_run tpm2_pcrread sha256:7 -o /sysroot/pcr7.bin > /sysroot/pcr7.out
231+
if [ ! -f /sysroot/pcr7.bin ]; then
232+
soci_log_run tpm2_pcrread sha256:7 -o /sysroot/pcr7.bin > /sysroot/pcr7.out
233+
fi
232234
soci_log_run tpm2_pcrextend "7:sha256=b7135cbb321a66fa848b07288bd008b89bd5b7496c4569c5e1a4efd5f7c8e0a7"
233235
soci_info "PCR7 has been extended. Ready to provision."
234236
;;

0 commit comments

Comments
 (0)