]> code.ossystems Code Review - openembedded-core.git/commitdiff
rng-tools: start rngd early in the boot process again
authorBedel, Alban <alban.bedel@aerq.com>
Tue, 23 Jul 2019 14:11:46 +0000 (14:11 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 26 Jul 2019 07:40:54 +0000 (08:40 +0100)
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@aerq.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-support/rng-tools/rng-tools/rngd.service

index 49d5de294fc7497a2b45abb6f25a65b4d50046ea..aaaaa290742a8b3c6b8e0c137b8162d759981b94 100644 (file)
@@ -1,5 +1,9 @@
 [Unit]
 Description=Hardware RNG Entropy Gatherer Daemon
+DefaultDependencies=no
+After=systemd-udev-settle.service
+Before=sysinit.target shutdown.target
+Conflicts=shutdown.target
 
 [Service]
 EnvironmentFile=-@SYSCONFDIR@/default/rng-tools