From c92b3aea9dc7b8f74ae48a025ad3edbb42dbc71e Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 24 Jun 2021 11:41:34 -0400 Subject: [PATCH] Mitigate error output from extraneous handles Unrelated handles in use will no longer result in misleading console output. --- .../initramfs/lib/dracut/hooks/cmdline/10-confluentdiskless.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent_osdeploy/suse15-diskless/initramfs/lib/dracut/hooks/cmdline/10-confluentdiskless.sh b/confluent_osdeploy/suse15-diskless/initramfs/lib/dracut/hooks/cmdline/10-confluentdiskless.sh index 07843553..b4824538 100644 --- a/confluent_osdeploy/suse15-diskless/initramfs/lib/dracut/hooks/cmdline/10-confluentdiskless.sh +++ b/confluent_osdeploy/suse15-diskless/initramfs/lib/dracut/hooks/cmdline/10-confluentdiskless.sh @@ -76,7 +76,7 @@ lasthdl="" for hdl in $(tpm2_getcap handles-persistent|awk '{print $2}'); do tpm2_startauthsession --policy-session --session=session.ctx tpm2_policypcr -Q --session=session.ctx --pcr-list="sha256:15" --policy=pcr15.sha256.policy - unsealeddata=$(tpm2_unseal --auth=session:session.ctx -Q -c $hdl) + unsealeddata=$(tpm2_unseal --auth=session:session.ctx -Q -c $hdl 2>/dev/null) tpm2_flushcontext session.ctx if [[ $unsealeddata == "CONFLUENT_APIKEY:"* ]]; then confluent_apikey=${unsealeddata#CONFLUENT_APIKEY:}