From b21d8f7a94ad130296decc7704e9265885a9fff6 Mon Sep 17 00:00:00 2001 From: Jonathon Hall Date: Fri, 10 Mar 2023 15:45:02 -0500 Subject: [PATCH] oem-factory-reset: Use tpmr reset tpm-reset is just a prompt for the password followed by tpmr reset. oem-factory-reset already bypasses the prompt, just call tpmr reset directly. Signed-off-by: Jonathon Hall --- initrd/bin/oem-factory-reset | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/initrd/bin/oem-factory-reset b/initrd/bin/oem-factory-reset index 74f1cc6e..8031b94a 100755 --- a/initrd/bin/oem-factory-reset +++ b/initrd/bin/oem-factory-reset @@ -610,10 +610,7 @@ fi ## reset TPM and set password if [ "$CONFIG_TPM" = "y" ]; then echo -e "\nResetting TPM...\n" - { - echo $TPM_PASS - echo $TPM_PASS - } | /bin/tpm-reset >/dev/null 2>/tmp/error + tpmr reset "$TPM_PASS" >/dev/null 2>/tmp/error fi if [ $? -ne 0 ]; then ERROR=$(tail -n 1 /tmp/error | fold -s)