diff --git a/man/systemd.service.xml b/man/systemd.service.xml index 1faac0f762..0678855945 100644 --- a/man/systemd.service.xml +++ b/man/systemd.service.xml @@ -328,14 +328,13 @@ all ExecStartPre= commands that were not prefixed with a - exit successfully. - ExecStartPost= commands are only run after - the service has started successfully, as determined by Type= - (i.e. the process has been started for Type=simple - or Type=idle, the process exits successfully for - Type=oneshot, the initial process exits successfully - for Type=forking, READY=1 is sent - for Type=notify, or the BusName= - has been taken for Type=dbus). + ExecStartPost= commands are only run after the commands specified in + ExecStart= have been invoked successfully, as determined by Type= + (i.e. the process has been started for Type=simple or Type=idle, the last + ExecStart= process exited successfully for Type=oneshot, the initial + process exited successfully for Type=forking, READY=1 is sent for + Type=notify, or the BusName= has been taken for + Type=dbus). Note that ExecStartPre= may not be used to start long-running processes. All processes forked diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 441378936a..dedeb6c6d0 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -546,26 +546,29 @@ Before= After= - A space-separated list of unit names. Configures ordering dependencies between units. If a - unit foo.service contains a setting and both units are - being started, bar.service's start-up is delayed until foo.service is - started up. Note that this setting is independent of and orthogonal to the requirement dependencies as - configured by Requires=, Wants= or BindsTo=. It is a - common pattern to include a unit name in both the After= and Requires= - option, in which case the unit listed will be started before the unit that is configured with these - options. This option may be specified more than once, in which case ordering dependencies for all listed names - are created. After= is the inverse of Before=, i.e. while - After= ensures that the configured unit is started after the listed unit finished starting - up, Before= ensures the opposite, i.e. that the configured unit is fully started up before - the listed unit is started. Note that when two units with an ordering dependency between them are shut down, - the inverse of the start-up order is applied. i.e. if a unit is configured with After= on - another unit, the former is stopped before the latter if both are shut down. Given two units with any ordering - dependency between them, if one unit is shut down and the other is started up, the shutdown is ordered before - the start-up. It doesn't matter if the ordering dependency is After= or - Before=, in this case. It also doesn't matter which of the two is shut down, as long as one - is shut down and the other is started up. The shutdown is ordered before the start-up in all cases. If two - units have no ordering dependencies between them, they are shut down or started up simultaneously, and no - ordering takes place. + These two settings expect a space-separated list of unit names. They configure ordering + dependencies between units. If a unit foo.service contains a setting + and both units are being started, bar.service's + start-up is delayed until foo.service has finished starting up. Note that this setting is + independent of and orthogonal to the requirement dependencies as configured by Requires=, + Wants= or BindsTo=. It is a common pattern to include a unit name in both + the After= and Requires= options, in which case the unit listed will be + started before the unit that is configured with these options. This option may be specified more than once, in + which case ordering dependencies for all listed names are created. After= is the inverse of + Before=, i.e. while After= ensures that the configured unit is started + after the listed unit finished starting up, Before= ensures the opposite, that the + configured unit is fully started up before the listed unit is started. Note that when two units with an + ordering dependency between them are shut down, the inverse of the start-up order is applied. i.e. if a unit is + configured with After= on another unit, the former is stopped before the latter if both are + shut down. Given two units with any ordering dependency between them, if one unit is shut down and the other is + started up, the shutdown is ordered before the start-up. It doesn't matter if the ordering dependency is + After= or Before=, in this case. It also doesn't matter which of the two + is shut down, as long as one is shut down and the other is started up. The shutdown is ordered before the + start-up in all cases. If two units have no ordering dependencies between them, they are shut down or started + up simultaneously, and no ordering takes place. It depends on the unit type when precisely a unit has finished + starting up. Most importantly, for service units start-up is considered completed for the purpose of + Before=/After= when all its configured start-up commands have been + invoked and they either failed or reported start-up success. @@ -980,13 +983,11 @@ to make sure they run before the stamp file's modification time gets reset indicating a completed update. - ConditionFirstBoot= takes a boolean - argument. This condition may be used to conditionalize units - on whether the system is booting up with an unpopulated - /etc directory. This may be used to - populate /etc on the first boot after - factory reset, or when a new system instances boots up for the - first time. + ConditionFirstBoot= takes a boolean argument. This condition may be used to + conditionalize units on whether the system is booting up with an unpopulated /etc + directory (specifically: an /etc with no /etc/machine-id). This may + be used to populate /etc on the first boot after factory reset, or when a new system + instance boots up for the first time. With ConditionPathExists= a file existence condition is checked before a unit is started. If