diff --git a/man/systemctl.xml b/man/systemctl.xml index e12e50dc80..2bf20142c0 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -1940,8 +1940,56 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err Exit status - On success, 0 is returned, a non-zero failure - code otherwise. + On success, 0 is returned, a non-zero failure code otherwise. + + systemctl uses the return codes defined by LSB, as defined in + LSB 3.0.0. + + + + LSB return codes + + + + + Value + Description in LSB + Use in systemd + + + + + 0 + "program is running or service is OK" + unit is active + + + 1 + "program is dead and /var/run pid file exists" + unit not failed (used by is-failed) + + + 2 + "program is dead and /var/lock lock file exists" + unused + + + 3 + "program is not running" + unit is not active + + + 4 + "program or service status is unknown" + no such unit + + + +
+ + The mapping of LSB service states to systemd unit states is imperfect, so it is better to + not rely on those return values but to look for specific unit states and substates instead. +
diff --git a/man/systemd.special.xml b/man/systemd.special.xml index 38006c6abd..0d25e40d03 100644 --- a/man/systemd.special.xml +++ b/man/systemd.special.xml @@ -596,14 +596,18 @@ A special target unit that sets up all slice units (see systemd.slice5 - for details) that shall be active after boot. By default the generic - system.slice slice unit, as well as the root slice unit - -.slice, is pulled in and ordered before this unit (see + for details) that shall always be active after boot. By default the generic + system.slice slice unit as well as the root slice unit + -.slice are pulled in and ordered before this unit (see below). - It's a good idea to add WantedBy=slices.target lines to the - [Install] section of all slices units that may be installed - dynamically. + Adding slice units to slices.target is generally not + necessary. Instead, when some unit that uses Slice= is started, the + specified slice will be started automatically. Adding + WantedBy=slices.target lines to the [Install] + section should only be done for units that need to be always active. In that case care + needs to be taken to avoid creating a loop through the automatic dependencies on + "parent" slices.