Samuel Sieb writes:
On 5/4/19 9:32 AM, Sam Varshavchik wrote:
>
> How can you possibly get stopping a piddly daemon, like rngd, wrong? Who
> knows. It's brain damage.
As usual, it is not a systemd problem, unless you consider that trying to do
a clean shutdown is brain damage. The rngd process gets stuck sometimes
(see the above mentioned bug) and systemd waits nicely for it to stop, but
finally gives up and force kills it.
In the good-old days, when integrating some new gizmo like rngd, by the
nature of the beast you'll always check into how it works and make a minimal
effort to learn its basics. Basic due diligence. From the linked bugzilla
bug, it seems that rngd was coded to ignore signals. So, having learned that
factoid, one would code the initscript to sigkill it, with no other options
available. One would even likely run it, and test it, to be sure it works.
Or maybe even not wasting time trying to stop it. The system's coming down.
Who cares.
But now, the mindset is completely different, and that's what I am
describing as the brain damage. All you need is a service file with an
ExecStart, to launch the thing. That's it. Nothing else needs to be done.
Don't worry about it. Systemd Knows Best. It'll take care of stopping it.
You don't need to do due diligence any more. Just trust the systemd to stop
it. And that's how you end up with 90 second shutdown delays.