[systemd-devel] failing unmounts during reboot

Frank Steiner fsteiner-mail1 at bio.ifi.lmu.de
Thu Jul 25 11:46:25 UTC 2019


Mantas Mikulėnas wrote:

> I think that's a deliberate decision made in the
> systemd-sysv-generator. Note how the generated .service files have
> "KillMode=process" (and even "RemainAfterExit=yes"). The default for
> native services is to kill the entire cgroup, and IIRC that even was
> one of the main reasons for using cgroups.
> Most likely it's there to retain compatibility with some of the
> weirder init.d scripts – those which don't start any daemons; those
> which start several; and so on and so on.

Thanks a lot! I found the service file in /run/systemd/generator.late.
Anyway, I cannot think of any init.d script where sub processes or
anything should be left running when the script is stopped, so
KillMode=process seems strange. Maybe Lennart knows why this decision
was taken.

But now that I found the service file, I created a drop-in
/etc/systemd/system/bla.service.d/kill.conf with

[Service]
KillMode=control-group

and now, after reloading everything, the sleep is killed.
So for all init.d scripts that I get from somewhere I've now
way to ensure that all their processes are cleaned up by a
simple drop-in.

This will likely solve most of my problems.

Thanks for pointing me to the right direction :-)

cu,
Frank

-- 
Dipl.-Inform. Frank Steiner   Web:  http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik    Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17           Phone: +49 89 2180-4049
80333 Muenchen, Germany       Fax:   +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *


More information about the systemd-devel mailing list