]> code.ossystems Code Review - openembedded-core.git/commitdiff
rng-tools: fix very long shutdown delay with systemd
authorBedel, Alban <alban.bedel@aerq.com>
Wed, 31 Jul 2019 14:01:58 +0000 (14:01 +0000)
committerArmin Kuster <akuster808@gmail.com>
Wed, 4 Sep 2019 15:21:39 +0000 (08:21 -0700)
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.

Signed-off-by: Alban Bedel <alban.bedel@aerq.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/recipes-support/rng-tools/rng-tools/rngd.service

index f0355db14fce4a1c779b0d893127fc4153513e52..5c8253b5fbade9b7eb4c15efff70020d309b65f5 100644 (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