]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man: Describe when ExecStartFoo= commands are run in more detail 930/head
authorRichard Maw <richard.maw@codethink.co.uk>
Tue, 11 Aug 2015 12:29:45 +0000 (12:29 +0000)
committerRichard Maw <richard.maw@codethink.co.uk>
Tue, 11 Aug 2015 13:01:53 +0000 (13:01 +0000)
Previously it was just descibed that ExecStartPost= commands were
started "after" the ExecStart= command(s).
This hasn't specified after which event, which varies from after it has
been started, after it has exited, after it has sent READY=1 or after it
has taken the bus name, depending on Type=.

This now describes that it happens after the *service* has "started",
as defined by the Type=, and provides some clarification about precisely
when this is.

This may be unnecessary duplication, but it removes the ambiguity as to
whether RemainAfterExit=no means that ExecStartPost= shouldn't be
started because it means the service has stopped when the ExecStart=
command terminates, not "started".

man/systemd.service.xml

index 7e96989583475f2439b9676ce2d29756905d851c..4c113a34790416c6e6ff3b75ac68a9becb749eed 100644 (file)
         <literal>-</literal>) fail, the rest are not executed and the
         unit is considered failed.</para>
 
+        <para><varname>ExecStart=</varname> commands are only run after
+        all <varname>ExecStartPre=</varname> commands that were not prefixed
+        with a <literal>-</literal> exit successfully.</para>
+
+        <para><varname>ExecStartPost=</varname> commands are only run after
+        the service has started, as determined by <varname>Type=</varname>
+        (i.e. The process has been started for <varname>Type=simple</varname>
+        or <varname>Type=idle</varname>, the process exits successfully for
+        <varname>Type=oneshot</varname>, the initial process exits successfully
+        for <varname>Type=forking</varname>, <literal>READY=1</literal> is sent
+        for <varname>Type=notify</varname>, or the <varname>BusName=</varname>
+        has been taken for <varname>Type=dbus</varname>).</para>
+
         <para>Note that <varname>ExecStartPre=</varname> may not be
         used to start long-running processes. All processes forked
         off by processes invoked via <varname>ExecStartPre=</varname> will