From 0318d54539fe168822447889ac0e858a10c55f74 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 15 Dec 2022 18:07:20 +0100 Subject: pcrphase: gracefully exit if TPM2 support is incomplete If everything points to the fact that TPM2 should work, but then the driver fails to initialize we should handle this gracefully and not cause failing services all over the place. Fixes: #25700 --- units/systemd-pcrphase-initrd.service.in | 4 ++-- units/systemd-pcrphase-sysinit.service.in | 4 ++-- units/systemd-pcrphase.service.in | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'units') diff --git a/units/systemd-pcrphase-initrd.service.in b/units/systemd-pcrphase-initrd.service.in index c1ad5ef844..e437c7e1ce 100644 --- a/units/systemd-pcrphase-initrd.service.in +++ b/units/systemd-pcrphase-initrd.service.in @@ -20,5 +20,5 @@ ConditionPathExists=/sys/firmware/efi/efivars/StubPcrKernelImage-4a67b082-0a4c-4 [Service] Type=oneshot RemainAfterExit=yes -ExecStart={{ROOTLIBEXECDIR}}/systemd-pcrphase enter-initrd -ExecStop={{ROOTLIBEXECDIR}}/systemd-pcrphase leave-initrd +ExecStart={{ROOTLIBEXECDIR}}/systemd-pcrphase --graceful enter-initrd +ExecStop={{ROOTLIBEXECDIR}}/systemd-pcrphase --graceful leave-initrd diff --git a/units/systemd-pcrphase-sysinit.service.in b/units/systemd-pcrphase-sysinit.service.in index 6b5ba7d878..a22fbbe935 100644 --- a/units/systemd-pcrphase-sysinit.service.in +++ b/units/systemd-pcrphase-sysinit.service.in @@ -21,5 +21,5 @@ ConditionPathExists=/sys/firmware/efi/efivars/StubPcrKernelImage-4a67b082-0a4c-4 [Service] Type=oneshot RemainAfterExit=yes -ExecStart={{ROOTLIBEXECDIR}}/systemd-pcrphase sysinit -ExecStop={{ROOTLIBEXECDIR}}/systemd-pcrphase final +ExecStart={{ROOTLIBEXECDIR}}/systemd-pcrphase --graceful sysinit +ExecStop={{ROOTLIBEXECDIR}}/systemd-pcrphase --graceful final diff --git a/units/systemd-pcrphase.service.in b/units/systemd-pcrphase.service.in index ce469befa8..5ba437e5b1 100644 --- a/units/systemd-pcrphase.service.in +++ b/units/systemd-pcrphase.service.in @@ -19,5 +19,5 @@ ConditionPathExists=/sys/firmware/efi/efivars/StubPcrKernelImage-4a67b082-0a4c-4 [Service] Type=oneshot RemainAfterExit=yes -ExecStart={{ROOTLIBEXECDIR}}/systemd-pcrphase ready -ExecStop={{ROOTLIBEXECDIR}}/systemd-pcrphase shutdown +ExecStart={{ROOTLIBEXECDIR}}/systemd-pcrphase --graceful ready +ExecStop={{ROOTLIBEXECDIR}}/systemd-pcrphase --graceful shutdown -- cgit v1.2.1