[systemd-devel] Handle device node timeout?

Lennart Poettering lennart at poettering.net
Mon Feb 19 10:18:13 UTC 2024


On Di, 16.01.24 16:06, Mikko Rapeli (mikko.rapeli at linaro.org) wrote:

> Hi,
>
> I have services which depend on a specific device node. How can I run
> some recovery actions when the default 90s timeout for finding this
> device is hit?
>
> OnFailure= doesn't work as the service is not even started.
>
> Specifically the case is about supporting TPM2 encrypted rootfs but falling
> back to plain-text rootfs generation if there is no TPM2 device. Currently
> my initramfs works with TPM2 but without it fails with:

In git main there's new infra to deal with this case:

https://github.com/systemd/systemd/pull/30194

That should hopefully solve this systematically and generically.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list