rng-tools: fix very long shutdown delay with systemd

The systemd service file has DefaultDependencies=no but is not
properly configured to also stop the unit. Because of this the unit
keep running after shutdown but systemd still waits for it to finish to
then later resort to a hard kill. All this take 1m30s with the default
configuration.

To fix this problem add the missing Before=shutdown.target and
Conflicts=shutdown.target to have systemd stop the unit on shutdown.

(From OE-Core rev: b6daf8a5755842c0e38b1a88687a18432138a45a)

Signed-off-by: Alban Bedel <alban.bedel@aerq.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Bedel, Alban
2019-07-31 14:01:58 +00:00
committed by Richard Purdie
parent bd1ccd4c28
commit 95632e679d

View File

@@ -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