[OE-core] [OE-Core][warrior][PATCH] rng-tools: start rngd early in the boot process again
Fabio Berton
fabio.berton at ossystems.com.br
Fri Aug 23 16:41:46 UTC 2019
Without this change, images with systemd hang on shutdown/reboot.
On Fri, Aug 23, 2019 at 1:39 PM Fabio Berton
<fabio.berton at ossystems.com.br> wrote:
>
> From: "Bedel, Alban" <alban.bedel at aerq.com>
>
> It do make sense to start rngd early in the boot process because
> otherwise we would need to track every service that might need entropy
> and explicitly configure it to start after rngd.
>
> When used with systemd rngd blocked the shutdown process because it
> simply missed the proper unit configuration. As the systemd
> documentation explains, when using DefaultDependencies=no one also
> have to explicitly configure the unit to properly stop at some point.
> This is normaly achieved by having Before=shutdown.target and
> Conflicts=shutdown.target set for the unit.
>
> To have rngd started early again we reverte the changes done to
> rngd.service in commit edf7606822 (rng-tools: fix rngd blocks system
> shutdown). To have it properly stopped on shutdown we also add
> Before=shutdown.target and Conflicts=shutdown.target.
>
> Signed-off-by: Alban Bedel <alban.bedel at aerq.com>
> Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
> (cherry picked from commit a74e7df33e2c8ab2152e3217c0a5df3f65971713)
> ---
> meta/recipes-support/rng-tools/rng-tools/rngd.service | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-support/rng-tools/rng-tools/rngd.service b/meta/recipes-support/rng-tools/rng-tools/rngd.service
> index f0355db14fc..5c8253b5fba 100644
> --- a/meta/recipes-support/rng-tools/rng-tools/rngd.service
> +++ b/meta/recipes-support/rng-tools/rng-tools/rngd.service
> @@ -2,7 +2,8 @@
> Description=Hardware RNG Entropy Gatherer Daemon
> DefaultDependencies=no
> After=systemd-udev-settle.service
> -Before=sysinit.target
> +Before=sysinit.target shutdown.target
> +Conflicts=shutdown.target
>
> [Service]
> ExecStart=@SBINDIR@/rngd -f -r /dev/hwrng
> --
> 2.20.1
>
More information about the Openembedded-core
mailing list