[systemd-devel] proper way for shutdown script

Xen list at xenhideout.nl
Thu Oct 6 18:30:34 UTC 2016

Lennart Poettering schreef op 06-10-2016 19:12:

> The way to have a process executed at shutdown is by using ExecStop=
> and making sure the unit is started at start-up time.
> Current systemd versions permit unit files without any ExecStart= to
> cover for this case, really old systemd versions didn't like that, in
> which case you need to specify ExecStart=/bin/true for them.

Didn't realize this. Reason was that when I ..provided a command without 
path... it first complained about the command being invalid.... but also 
then that there was no ExecStart defined which was a problem to it ... ?

So I assumed at that point that I couldn't leave it out.

I have 229.

> Well, but that in case your service won't be reached either, as your
> service implicitly depends on basic.target unless you set
> DefaultDependencies=no.

Right. That also means auto-generated units for init.d scripts also 
never get fired in rescue.target right.

As to the naming thing, I am not going to respond you know. People 
assume that you /want/ something when you /say/ something but mostly I'm 
confused as to where they got the idea that I want something specific 
right this instant that they are then going to battle against.

There is some craze about killing suggestions before they even come out 
of the egg. The popular internet meme for this is "kill it before it 
lays eggs" ;-).

I am happy you take it with such a sense of humour.


More information about the systemd-devel mailing list