Is there a precedence or order of operations for the performance of items in a systemd service unit configuration file?
For example, ExecStartPre
operations obviously happen before ExecStart
. And multiple ExecStartPre
operations are each executed to completion, serially and in order. Also, ExecCondition
operations are defined to happen before ExecStartPre
(and with a very specific ordering/execution).
And the RuntimeDirectory
operation/creation happens before ExecStart
.
But does the RuntimeDirectory
operation/creation necessarily happen after ExecStartPre
completion? (my experiments suggest that it does, but I might have been fooled may be a race condition -- or have experienced an implementation-dependent behavior). Presumably RuntimeDirectory
creation is also thus well after ExecCondition
operations?
Similarly, do ExecStopPost
operations necessarily happen before or after the RuntimeDirectory
is removed?
Are there other subtle-but-implicit guaranteed orderings within a given service? Or, conversely, are there other operations that can happen in parallel (or otherwise have their ordering undefined)?
Joe
points out, "the latest version" can vary across distros (hence, "implementation-dependent"). – jhfrontz Jan 16 '20 at 15:16