From 4298e26176c289841b8492cbd1f6a0f6c1f205fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 16 Apr 2018 17:08:21 +0200 Subject: [PATCH 1/7] meson: fix indentation for systemd-time-sync-wait(5) entries Those files should not be updated manually, because then automatic updates contain spurious "changes". --- man/rules/meson.build | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/man/rules/meson.build b/man/rules/meson.build index 1cce1043bf..173ed8f976 100644 --- a/man/rules/meson.build +++ b/man/rules/meson.build @@ -628,8 +628,8 @@ manpages = [ '8', ['systemd-hibernate.service', 'systemd-hybrid-sleep.service', - 'systemd-suspend-then-hibernate.service', - 'systemd-sleep'], + 'systemd-sleep', + 'systemd-suspend-then-hibernate.service'], ''], ['systemd-sysctl.service', '8', ['systemd-sysctl'], ''], ['systemd-system-update-generator', '8', [], ''], @@ -639,7 +639,10 @@ manpages = [ ''], ['systemd-sysusers', '8', ['systemd-sysusers.service'], ''], ['systemd-sysv-generator', '8', [], 'HAVE_SYSV_COMPAT'], - ['systemd-time-wait-sync.service', '8', ['systemd-time-wait-sync'], 'ENABLE_TIMESYNCD'], + ['systemd-time-wait-sync.service', + '8', + ['systemd-time-wait-sync'], + 'ENABLE_TIMESYNCD'], ['systemd-timedated.service', '8', ['systemd-timedated'], 'ENABLE_TIMEDATED'], ['systemd-timesyncd.service', '8', ['systemd-timesyncd'], 'ENABLE_TIMESYNCD'], ['systemd-tmpfiles', From 0f943ae4ea36148c0e2c4a69735410c8e48648d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 16 Apr 2018 17:09:58 +0200 Subject: [PATCH 2/7] man: add a new page with a general description of common syntax We have a common parser, but for the user it might be completely unobvious that the same general rules apply to all those files. Let's add a page about the basic syntax so that the more specific pages don't have to repeat those details. --- man/journal-remote.conf.xml | 5 +- man/journal-upload.conf.xml | 5 +- man/journald.conf.xml | 8 ++- man/logind.conf.xml | 8 +-- man/rules/meson.build | 1 + man/systemd-sleep.conf.xml | 5 +- man/systemd-system.conf.xml | 4 +- man/systemd.syntax.xml | 107 ++++++++++++++++++++++++++++++++++++ man/systemd.unit.xml | 33 +++-------- man/timesyncd.conf.xml | 6 +- 10 files changed, 142 insertions(+), 40 deletions(-) create mode 100644 man/systemd.syntax.xml diff --git a/man/journal-remote.conf.xml b/man/journal-remote.conf.xml index b21d38c5b8..24ade09023 100644 --- a/man/journal-remote.conf.xml +++ b/man/journal-remote.conf.xml @@ -48,7 +48,10 @@ Description These files configure various parameters of - systemd-journal-remote.service8. + systemd-journal-remote.service8. + See + systemd.syntax5 + for a general description of the syntax. diff --git a/man/journal-upload.conf.xml b/man/journal-upload.conf.xml index 846031d237..8e241370db 100644 --- a/man/journal-upload.conf.xml +++ b/man/journal-upload.conf.xml @@ -48,7 +48,10 @@ Description These files configure various parameters of - systemd-journal-upload.service8. + systemd-journal-upload.service8. + See + systemd.syntax5 + for a general description of the syntax. diff --git a/man/journald.conf.xml b/man/journald.conf.xml index a4ae1af170..96422a3a2f 100644 --- a/man/journald.conf.xml +++ b/man/journald.conf.xml @@ -47,9 +47,11 @@ Description - These files configure various parameters of the systemd - journal service, - systemd-journald.service8. + These files configure various parameters of the systemd journal service, + systemd-journald.service8. + See + systemd.syntax5 + for a general description of the syntax. diff --git a/man/logind.conf.xml b/man/logind.conf.xml index 6118aa5e3d..9e21c0b218 100644 --- a/man/logind.conf.xml +++ b/man/logind.conf.xml @@ -50,10 +50,10 @@ Description - These files configure various parameters of the systemd - login manager, - systemd-logind.service8. - + These files configure various parameters of the systemd login manager, + systemd-logind.service8. See + systemd.syntax5 + for a general description of the syntax. diff --git a/man/rules/meson.build b/man/rules/meson.build index 173ed8f976..9b57f10cc0 100644 --- a/man/rules/meson.build +++ b/man/rules/meson.build @@ -699,6 +699,7 @@ manpages = [ ['systemd.socket', '5', [], ''], ['systemd.special', '7', [], ''], ['systemd.swap', '5', [], ''], + ['systemd.syntax', '7', [], ''], ['systemd.target', '5', [], ''], ['systemd.time', '7', [], ''], ['systemd.timer', '5', [], ''], diff --git a/man/systemd-sleep.conf.xml b/man/systemd-sleep.conf.xml index 3652c2066b..84e52d3bd8 100644 --- a/man/systemd-sleep.conf.xml +++ b/man/systemd-sleep.conf.xml @@ -109,7 +109,10 @@ systemd-sleep8 when systemd1 - attempts to suspend or hibernate the machine. + attempts to suspend or hibernate the machine. + See + systemd.syntax5 + for a general description of the syntax. diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml index b31eb11f8c..36bd4aaee5 100644 --- a/man/systemd-system.conf.xml +++ b/man/systemd-system.conf.xml @@ -63,7 +63,9 @@ user.conf and the files in user.conf.d directories. These configuration files contain a few settings controlling basic manager - operations. + operations. See + systemd.syntax5 + for a general description of the syntax. diff --git a/man/systemd.syntax.xml b/man/systemd.syntax.xml new file mode 100644 index 0000000000..bafe817a9b --- /dev/null +++ b/man/systemd.syntax.xml @@ -0,0 +1,107 @@ + + +%entities; +]> + + + + + + + systemd.syntax + systemd + + + + A. U. Thor + Zbigniew + Jędrzejewski-Szmek + zbyszek@in.waw.pl + + + + + + systemd.syntax + 7 + + + + systemd.syntax + General syntax of systemd configuration files + + + + Introduction + + This page describes the basic principles of configuration files used by + systemd1 + and related programs for: + + systemd unit files, see + systemd.unit5, + systemd.service5, + systemd.socket5, + systemd.device5, + systemd.mount5, + systemd.automount5, + systemd.swap5, + systemd.target5, + systemd.path5, + systemd.timer5, + systemd.slice5, + systemd.scope5 + + daemon config files, see + systemd-system.conf5, + systemd-user.conf5, + logind.conf5, + journald.conf5, + journal-remote.conf5, + journal-upload.conf5, + systemd-sleep.conf5, + timesyncd.conf5 + + + + + The syntax is inspired by + XDG Desktop Entry Specification + .desktop files, which are in turn inspired by Microsoft Windows + .ini files. + + + Each file is a plain text file divided into sections, with configuration entries in the + style key=value. + Empty lines and lines starting with # or ; are + ignored, which may be used for commenting. + + Lines ending in a backslash are concatenated with the following line while reading and the + backslash is replaced by a space character. This may be used to wrap long lines. The limit on + line length is very large (currently 1 MB), but it is recommended to avoid such long lines and + use multiple directives, variable substitution, or other mechanism as appropriate for the given + file type. + + [Section A] +KeyOne=value 1 +KeyTwo=value 2 + +# a comment + +[Section B] +Setting="something" "some thing" "…" +KeyTwo=value 2 \ + value 2 continued + + + Various settings are allowed to be specified more than once, in which case the + interpretation depends on the setting. Often, multiple settings form a list, and setting to an + empty value "resets", which means that previous assignments are ignored. When this is allowed, + it is mentioned in the description of the setting. Note that using multiple assignments to the + same value makes the file incompatible with parsers for the XDG .desktop + file format. + + + diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 2baf9d17e8..5ea615d998 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -83,18 +83,13 @@ Description - A unit configuration file encodes information about a - service, a socket, a device, a mount point, an automount point, a - swap file or partition, a start-up target, a watched file system - path, a timer controlled and supervised by - systemd1, - a resource management slice or - a group of externally created processes. The syntax is inspired by - XDG - Desktop Entry Specification .desktop - files, which are in turn inspired by Microsoft Windows - .ini files. + A unit file is a plain text ini-style file that encodes information about a service, a + socket, a device, a mount point, an automount point, a swap file or partition, a start-up + target, a watched file system path, a timer controlled and supervised by + systemd1, a + resource management slice or a group of externally created processes. See + systemd.syntax5 + for a general description of the syntax. This man page lists the common configuration options of all the unit types. These options need to be configured in the [Unit] @@ -117,15 +112,6 @@ systemd.scope5. - Various settings are allowed to be specified more than once, - in which case the interpretation depends on the setting. Often, - multiple settings form a list, and setting to an empty value - "resets", which means that previous assignments are ignored. When - this is allowed, it is mentioned in the description of the - setting. Note that using multiple assignments to the same value - makes the unit file incompatible with parsers for the XDG - .desktop file format. - Unit files are loaded from a set of paths determined during compilation, described in the next section. @@ -154,11 +140,6 @@ w, ms, us. For details see systemd.time7. - Empty lines and lines starting with # or ; are - ignored. This may be used for commenting. Lines ending in a backslash are concatenated with the - following line while reading and the backslash is replaced by a space character. This may be - used to wrap long lines. - Units can be aliased (have an alternative name), by creating a symlink from the new name to the existing name in one of the unit search paths. For example, systemd-networkd.service has the alias diff --git a/man/timesyncd.conf.xml b/man/timesyncd.conf.xml index c6dbb1ef4e..9292373bd9 100644 --- a/man/timesyncd.conf.xml +++ b/man/timesyncd.conf.xml @@ -47,9 +47,9 @@ Description - These configuration files control NTP network time - synchronization. - + These configuration files control NTP network time synchronization. See + systemd.syntax5 + for a general description of the syntax. From c643653e25f440d0bcdc51e29714b9d367512423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 16 Apr 2018 17:20:23 +0200 Subject: [PATCH 3/7] man: be more explicit about sd-journal-upload input format Fixes #3857. --- man/systemd-journal-upload.xml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/man/systemd-journal-upload.xml b/man/systemd-journal-upload.xml index ece0a9c428..5e1d8836b0 100644 --- a/man/systemd-journal-upload.xml +++ b/man/systemd-journal-upload.xml @@ -52,14 +52,13 @@ Description - - systemd-journal-upload will upload journal - entries to the URL specified with . Unless - limited by one of the options specified below, all journal - entries accessible to the user the program is running as will be - uploaded, and then the program will wait and send new entries - as they become available. - + systemd-journal-upload will upload journal entries to the URL specified + with . This program reads journal entries from one or more journal files, + similarly to + journalctl1. + Unless limited by one of the options specified below, all journal entries accessible to the user + the program is running as will be uploaded, and then the program will wait and send new entries + as they become available. From 492cb5095b0b742339bb9356ea9ef347843ef238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 18 Apr 2018 09:15:28 +0200 Subject: [PATCH 4/7] man: use --option= in more places --- man/systemd-journal-remote.xml | 4 ++-- man/systemd-journal-upload.xml | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/man/systemd-journal-remote.xml b/man/systemd-journal-remote.xml index 91ced9c7d4..1701495357 100644 --- a/man/systemd-journal-remote.xml +++ b/man/systemd-journal-remote.xml @@ -163,8 +163,8 @@ through $LISTEN_FDS/$LISTEN_PID. In the second case, an HTTP or HTTPS server will be spawned on - this port, respectively for and - . Currently, only POST requests + this port, respectively for and + . Currently, only POST requests to /upload with Content-Type: application/vnd.fdo.journal are supported. diff --git a/man/systemd-journal-upload.xml b/man/systemd-journal-upload.xml index 5e1d8836b0..fc3ecd2fdc 100644 --- a/man/systemd-journal-upload.xml +++ b/man/systemd-journal-upload.xml @@ -53,7 +53,7 @@ Description systemd-journal-upload will upload journal entries to the URL specified - with . This program reads journal entries from one or more journal files, + with . This program reads journal entries from one or more journal files, similarly to journalctl1. Unless limited by one of the options specified below, all journal entries accessible to the user @@ -109,7 +109,7 @@ entries from the specified journal directory DIR instead of the default runtime and system journal paths. This has the same meaning as - option for + option for journalctl1. @@ -122,7 +122,7 @@ GLOB instead of the default runtime and system journal paths. May be specified multiple times, in which case files will be suitably interleaved. This has the same meaning as - option for + option for journalctl1. @@ -132,7 +132,7 @@ Upload entries from the location in the journal specified by the passed cursor. This has the same - meaning as option for + meaning as option for journalctl1. @@ -142,7 +142,7 @@ Upload entries from the location in the journal after the location specified by the this cursor. This has the same meaning as - option for + option for journalctl1. From 2116134b04abbe34afbb2269f59b1c3610c7794a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 16 Apr 2018 17:42:10 +0200 Subject: [PATCH 5/7] man: briefly document Following= Fixes #1914. --- man/systemd.unit.xml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 5ea615d998..8b4a29445d 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -1312,7 +1312,7 @@ Unit settings that create a relationship with a second unit usually show up in properties of both units, for example in systemctl show output. In some cases the name of the property is the same as the name of the - configuration setting, but not always. This table lists the pairs of properties + configuration setting, but not always. This table lists the properties that are shown on two units which are connected through some dependency, and shows which property on "source" unit corresponds to which property on the "target" unit. @@ -1387,6 +1387,11 @@ ReloadPropagatedFrom= PropagatesReloadTo= + + Following= + n/a + An automatic property + @@ -1412,6 +1417,10 @@ systemd.automount5 for details. TriggersBy= is created implicitly on the triggered unit. + + Note: Following= is used to group device aliases and points to the + "primary" device unit that systemd is using to track device state, usually corresponding to a + sysfs path. It does not show up in the "target" unit. From 75695fb798ef34e5b1bd4a8b892f861b5d88601d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 16 Apr 2018 17:57:37 +0200 Subject: [PATCH 6/7] man: describe unit templating explicitly This patch is heavily based on the text suggested by archenemies in #3791. Fixes #3791. --- man/systemd.service.xml | 14 ++++++++++++++ man/systemd.unit.xml | 32 +++++++++++++++++--------------- 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/man/systemd.service.xml b/man/systemd.service.xml index 1e309904fa..614a60489d 100644 --- a/man/systemd.service.xml +++ b/man/systemd.service.xml @@ -77,6 +77,20 @@ with SysV document. + + Service Templates + + It is possible for systemd services to take a single argument via the + service@argument.service + syntax. Such services are called "instantiated" services, while the unit definition without the + argument parameter is called a "template". An example could be a + dhcpcd@.service service template which takes a network interface as a + parameter to form an instantiated service. Within the service file, this parameter or "instance + name" can be accessed with %-specifiers. See + systemd.unit5 + for details. + + Implicit Dependencies diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 8b4a29445d..9264dd1472 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -115,6 +115,14 @@ Unit files are loaded from a set of paths determined during compilation, described in the next section. + Unit files can be parameterized by a single argument called the "instance name". The unit + is then constructed based on a "template file" which serves as the definition of multiple + services or other units. A template unit must have a single @ at the end of + the name (right before the type suffix). The name of the full unit is formed by inserting the + instance name between @ and the unit type suffix. In the unit file itself, + the instance parameter may be referred to using %i and other specifiers, see + below. + Unit files may contain additional options on top of those listed here. If systemd encounters an unknown option, it will write a warning log message but continue loading the unit. If an @@ -204,21 +212,15 @@ socket-based activation which make dependencies implicit, resulting in a both simpler and more flexible system. - Optionally, units may be instantiated from a - template file at runtime. This allows creation of - multiple units from a single configuration file. If - systemd looks for a unit configuration file, it will - first search for the literal unit name in the - file system. If that yields no success and the unit - name contains an @ character, systemd will look for a - unit template that shares the same name but with the - instance string (i.e. the part between the @ character - and the suffix) removed. Example: if a service - getty@tty3.service is requested - and no file by that name is found, systemd will look - for getty@.service and - instantiate a service from that configuration file if - it is found. + As mentioned above, a unit may be instantiated from a template file. This allows creation + of multiple units from a single configuration file. If systemd looks for a unit configuration + file, it will first search for the literal unit name in the file system. If that yields no + success and the unit name contains an @ character, systemd will look for a + unit template that shares the same name but with the instance string (i.e. the part between the + @ character and the suffix) removed. Example: if a service + getty@tty3.service is requested and no file by that name is found, systemd + will look for getty@.service and instantiate a service from that + configuration file if it is found. To refer to the instance string from within the configuration file you may use the special %i From aed5cb03db916de7e685eaf59975c41326e4f778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 16 Apr 2018 18:00:33 +0200 Subject: [PATCH 7/7] man: merge two sections into two subsections of one section Those are very close subjects that are a good fit for one section. --- man/systemd.automount.xml | 40 ++++++++++-------- man/systemd.device.xml | 29 +++++++------ man/systemd.mount.xml | 84 ++++++++++++++++++++------------------ man/systemd.path.xml | 50 ++++++++++++----------- man/systemd.scope.xml | 42 ++++++++++--------- man/systemd.service.xml | 86 ++++++++++++++++++++------------------- man/systemd.slice.xml | 40 ++++++++++-------- man/systemd.socket.xml | 80 +++++++++++++++++++----------------- man/systemd.swap.xml | 48 ++++++++++++---------- man/systemd.target.xml | 42 ++++++++++--------- man/systemd.timer.xml | 38 ++++++++++------- man/systemd.unit.xml | 58 +++++++++++++------------- 12 files changed, 343 insertions(+), 294 deletions(-) diff --git a/man/systemd.automount.xml b/man/systemd.automount.xml index 5c58c87086..44add70d21 100644 --- a/man/systemd.automount.xml +++ b/man/systemd.automount.xml @@ -76,30 +76,34 @@ - Implicit Dependencies + Automatic Dependencies - The following dependencies are implicitly added: + + Implicit Dependencies - - If an automount unit is beneath another mount unit in the - file system hierarchy, both a requirement and an ordering - dependency between both units are created automatically. + The following dependencies are implicitly added: - An implicit Before= dependency is created - between an automount unit and the mount unit it activates. - - + + If an automount unit is beneath another mount unit in the + file system hierarchy, both a requirement and an ordering + dependency between both units are created automatically. - - Default Dependencies + An implicit Before= dependency is created + between an automount unit and the mount unit it activates. + + - The following dependencies are added unless DefaultDependencies=no is set: + + Default Dependencies - - Automount units acquire automatic Before= and - Conflicts= on umount.target in order to be stopped during - shutdown. - + The following dependencies are added unless DefaultDependencies=no is set: + + + Automount units acquire automatic Before= and + Conflicts= on umount.target in order to be stopped during + shutdown. + + diff --git a/man/systemd.device.xml b/man/systemd.device.xml index 3be5fc0e90..2509b242ba 100644 --- a/man/systemd.device.xml +++ b/man/systemd.device.xml @@ -77,25 +77,28 @@ corresponding device generates a changed event. Other units can use ReloadPropagatedFrom= to react to that event - - Implicit Dependencies + Automatic Dependencies - Many unit types automatically acquire dependencies on device - units of devices they require. For example, - .socket unit acquire dependencies on the - device units of the network interface specified in - BindToDevice=. Similar, swap and mount units - acquire dependencies on the units encapsulating their backing - block devices. - + + Implicit Dependencies - - Default Dependencies + Many unit types automatically acquire dependencies on device + units of devices they require. For example, + .socket unit acquire dependencies on the + device units of the network interface specified in + BindToDevice=. Similar, swap and mount units + acquire dependencies on the units encapsulating their backing + block devices. + - There are no default dependencies for device units. + + Default Dependencies + + There are no default dependencies for device units. + diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml index cb23e5e84a..cdba7a20b9 100644 --- a/man/systemd.mount.xml +++ b/man/systemd.mount.xml @@ -102,57 +102,61 @@ - Implicit Dependencies + Automatic Dependencies - The following dependencies are implicitly added: + + Implicit Dependencies - - If a mount unit is beneath another mount unit in the file - system hierarchy, both a requirement dependency and an ordering - dependency between both units are created automatically. + The following dependencies are implicitly added: - Block device backed file systems automatically gain - BindsTo= and After= type - dependencies on the device unit encapsulating the block - device (see below). + + If a mount unit is beneath another mount unit in the file + system hierarchy, both a requirement dependency and an ordering + dependency between both units are created automatically. - If traditional file system quota is enabled for a mount - unit, automatic Wants= and - Before= dependencies on - systemd-quotacheck.service and - quotaon.service are added. + Block device backed file systems automatically gain + BindsTo= and After= type + dependencies on the device unit encapsulating the block + device (see below). - Additional implicit dependencies may be added as result of - execution and resource control parameters as documented in - systemd.exec5 - and - systemd.resource-control5. - - - + If traditional file system quota is enabled for a mount + unit, automatic Wants= and + Before= dependencies on + systemd-quotacheck.service and + quotaon.service are added. - - Default Dependencies + Additional implicit dependencies may be added as result of + execution and resource control parameters as documented in + systemd.exec5 + and + systemd.resource-control5. + + + - The following dependencies are added unless DefaultDependencies=no is set: + + Default Dependencies - - All mount units acquire automatic Before= and Conflicts= on - umount.target in order to be stopped during shutdown. + The following dependencies are added unless DefaultDependencies=no is set: - Mount units referring to local file systems automatically gain - an After= dependency on local-fs-pre.target. + + All mount units acquire automatic Before= and Conflicts= on + umount.target in order to be stopped during shutdown. - Network mount units - automatically acquire After= dependencies on remote-fs-pre.target, - network.target and network-online.target. Towards the latter a - Wants= unit is added as well. - + Mount units referring to local file systems automatically gain + an After= dependency on local-fs-pre.target. - Mount units referring to local and network file systems are - distinguished by their file system type specification. In some cases this is not sufficient (for example network - block device based mounts, such as iSCSI), in which case may be added to the mount option - string of the unit, which forces systemd to consider the mount unit a network mount. + Network mount units + automatically acquire After= dependencies on remote-fs-pre.target, + network.target and network-online.target. Towards the latter a + Wants= unit is added as well. + + + Mount units referring to local and network file systems are distinguished by their file system type + specification. In some cases this is not sufficient (for example network block device based mounts, such as + iSCSI), in which case may be added to the mount option string of the unit, which forces + systemd to consider the mount unit a network mount. + diff --git a/man/systemd.path.xml b/man/systemd.path.xml index dc21885309..513ca70692 100644 --- a/man/systemd.path.xml +++ b/man/systemd.path.xml @@ -71,36 +71,40 @@ - Implicit Dependencies + Automatic Dependencies - The following dependencies are implicitly added: + + Implicit Dependencies - - If a path unit is beneath another mount unit in the file - system hierarchy, both a requirement and an ordering dependency - between both units are created automatically. + The following dependencies are implicitly added: - An implicit Before= dependency is added - between a path unit and the unit it is supposed to activate. - - + + If a path unit is beneath another mount unit in the file + system hierarchy, both a requirement and an ordering dependency + between both units are created automatically. - - Default Dependencies + An implicit Before= dependency is added + between a path unit and the unit it is supposed to activate. + + - The following dependencies are added unless DefaultDependencies=no is set: + + Default Dependencies - - Path units will automatically have dependencies of type Before= on - paths.target, - dependencies of type After= and Requires= on - sysinit.target, and have dependencies of type Conflicts= and - Before= on shutdown.target. These ensure that path units are terminated - cleanly prior to system shutdown. Only path units involved with early boot or late system shutdown should - disable DefaultDependencies= option. - + The following dependencies are added unless DefaultDependencies=no is set: - + + Path units will automatically have dependencies of type Before= on + paths.target, + dependencies of type After= and Requires= on + sysinit.target, and have dependencies of type Conflicts= and + Before= on shutdown.target. These ensure that path units are terminated + cleanly prior to system shutdown. Only path units involved with early boot or late system shutdown should + disable DefaultDependencies= option. + + + + diff --git a/man/systemd.scope.xml b/man/systemd.scope.xml index cf888696cd..317500c3f6 100644 --- a/man/systemd.scope.xml +++ b/man/systemd.scope.xml @@ -64,29 +64,33 @@ - Implicit Dependencies + Automatic Dependencies - Implicit dependencies may be added as result of - resource control parameters as documented in - systemd.resource-control5. - + + Implicit Dependencies - - Default Dependencies + Implicit dependencies may be added as result of + resource control parameters as documented in + systemd.resource-control5. + - The following dependencies are added unless - DefaultDependencies=no is set: + + Default Dependencies - - Scope units will automatically have dependencies of - type Conflicts= and - Before= on - shutdown.target. These ensure - that scope units are removed prior to system - shutdown. Only scope units involved with early boot or - late system shutdown should disable - DefaultDependencies= option. - + The following dependencies are added unless + DefaultDependencies=no is set: + + + Scope units will automatically have dependencies of + type Conflicts= and + Before= on + shutdown.target. These ensure + that scope units are removed prior to system + shutdown. Only scope units involved with early boot or + late system shutdown should disable + DefaultDependencies= option. + + diff --git a/man/systemd.service.xml b/man/systemd.service.xml index 614a60489d..5c29ecb460 100644 --- a/man/systemd.service.xml +++ b/man/systemd.service.xml @@ -92,55 +92,59 @@ - Implicit Dependencies + Automatic Dependencies - The following dependencies are implicitly added: + + Implicit Dependencies - - Services with Type=dbus set automatically - acquire dependencies of type Requires= and - After= on - dbus.socket. + The following dependencies are implicitly added: - Socket activated services are automatically ordered after - their activating .socket units via an - automatic After= dependency. - Services also pull in all .socket units - listed in Sockets= via automatic - Wants= and After= dependencies. - + + Services with Type=dbus set automatically + acquire dependencies of type Requires= and + After= on + dbus.socket. - Additional implicit dependencies may be added as result of - execution and resource control parameters as documented in - systemd.exec5 - and - systemd.resource-control5. - + Socket activated services are automatically ordered after + their activating .socket units via an + automatic After= dependency. + Services also pull in all .socket units + listed in Sockets= via automatic + Wants= and After= dependencies. + - - Default Dependencies + Additional implicit dependencies may be added as result of + execution and resource control parameters as documented in + systemd.exec5 + and + systemd.resource-control5. + - The following dependencies are added unless DefaultDependencies=no is set: + + Default Dependencies - - Service units will have dependencies of type Requires= and - After= on sysinit.target, a dependency of type After= on - basic.target as well as dependencies of type Conflicts= and - Before= on shutdown.target. These ensure that normal service units pull in - basic system initialization, and are terminated cleanly prior to system shutdown. Only services involved with early - boot or late system shutdown should disable this option. + The following dependencies are added unless DefaultDependencies=no is set: - Instanced service units (i.e. service units with an @ in their name) are assigned by - default a per-template slice unit (see - systemd.slice5), named after the - template unit, containing all instances of the specific template. This slice is normally stopped at shutdown, - together with all template instances. If that is not desired, set DefaultDependencies=no in the - template unit, and either define your own per-template slice unit file that also sets - DefaultDependencies=no, or set Slice=system.slice (or another suitable slice) - in the template unit. Also see - systemd.resource-control5. - - + + Service units will have dependencies of type Requires= and + After= on sysinit.target, a dependency of type After= on + basic.target as well as dependencies of type Conflicts= and + Before= on shutdown.target. These ensure that normal service units pull in + basic system initialization, and are terminated cleanly prior to system shutdown. Only services involved with early + boot or late system shutdown should disable this option. + + Instanced service units (i.e. service units with an @ in their name) are assigned by + default a per-template slice unit (see + systemd.slice5), named after the + template unit, containing all instances of the specific template. This slice is normally stopped at shutdown, + together with all template instances. If that is not desired, set DefaultDependencies=no in the + template unit, and either define your own per-template slice unit file that also sets + DefaultDependencies=no, or set Slice=system.slice (or another suitable slice) + in the template unit. Also see + systemd.resource-control5. + + + diff --git a/man/systemd.slice.xml b/man/systemd.slice.xml index af95455916..4e87f98c9f 100644 --- a/man/systemd.slice.xml +++ b/man/systemd.slice.xml @@ -85,29 +85,33 @@ - Implicit Dependencies + Automatic Dependencies - The following dependencies are implicitly added: + + Implicit Dependencies - - Slice units automatically gain dependencies of type - After= and Requires= on - their immediate parent slice unit. - - + The following dependencies are implicitly added: - - Default Dependencies + + Slice units automatically gain dependencies of type + After= and Requires= on + their immediate parent slice unit. + + - The following dependencies are added unless DefaultDependencies=no is set: + + Default Dependencies - - Slice units will automatically have dependencies of type Conflicts= and - Before= on - shutdown.target. These ensure that slice units are removed prior to system shutdown. - Only slice units involved with late system shutdown should disable - DefaultDependencies= option. - + The following dependencies are added unless DefaultDependencies=no is set: + + + Slice units will automatically have dependencies of type Conflicts= and + Before= on + shutdown.target. These ensure that slice units are removed prior to system shutdown. + Only slice units involved with late system shutdown should disable + DefaultDependencies= option. + + diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml index 6e5ba6af72..d11fecd9b7 100644 --- a/man/systemd.socket.xml +++ b/man/systemd.socket.xml @@ -110,53 +110,57 @@ - Implicit Dependencies + Automatic Dependencies - The following dependencies are implicitly added: + + Implicit Dependencies - - Socket units automatically gain a Before= - dependency on the service units they activate. + The following dependencies are implicitly added: - Socket units referring to file system paths (such as AF_UNIX - sockets or FIFOs) implicitly gain Requires= and - After= dependencies on all mount units - necessary to access those paths. + + Socket units automatically gain a Before= + dependency on the service units they activate. - Socket units using the BindToDevice= - setting automatically gain a BindsTo= and - After= dependency on the device unit - encapsulating the specified network interface. - + Socket units referring to file system paths (such as AF_UNIX + sockets or FIFOs) implicitly gain Requires= and + After= dependencies on all mount units + necessary to access those paths. - Additional implicit dependencies may be added as result of - execution and resource control parameters as documented in - systemd.exec5 - and - systemd.resource-control5. - + Socket units using the BindToDevice= + setting automatically gain a BindsTo= and + After= dependency on the device unit + encapsulating the specified network interface. + - - Default Dependencies + Additional implicit dependencies may be added as result of + execution and resource control parameters as documented in + systemd.exec5 + and + systemd.resource-control5. + - The following dependencies are added unless - DefaultDependencies=no is set: + + Default Dependencies - - Socket units automatically gain a - Before= dependency on - sockets.target. + The following dependencies are added unless + DefaultDependencies=no is set: - Socket units automatically gain a pair of - After= and Requires= - dependency on sysinit.target, and a pair of - Before= and Conflicts= - dependencies on shutdown.target. These - dependencies ensure that the socket unit is started before normal - services at boot, and is stopped on shutdown. Only sockets - involved with early boot or late system shutdown should disable - DefaultDependencies= option. - + + Socket units automatically gain a + Before= dependency on + sockets.target. + + Socket units automatically gain a pair of + After= and Requires= + dependency on sysinit.target, and a pair of + Before= and Conflicts= + dependencies on shutdown.target. These + dependencies ensure that the socket unit is started before normal + services at boot, and is stopped on shutdown. Only sockets + involved with early boot or late system shutdown should disable + DefaultDependencies= option. + + diff --git a/man/systemd.swap.xml b/man/systemd.swap.xml index 5a2ec49212..8f865fcb8a 100644 --- a/man/systemd.swap.xml +++ b/man/systemd.swap.xml @@ -76,34 +76,38 @@ - Implicit Dependencies + Automatic Dependencies - The following dependencies are implicitly added: + + Implicit Dependencies - - All swap units automatically get the - BindsTo= and After= - dependencies on the device units or the mount units of the files - they are activated from. - + The following dependencies are implicitly added: - Additional implicit dependencies may be added as result of - execution and resource control parameters as documented in - systemd.exec5 - and - systemd.resource-control5. - + + All swap units automatically get the + BindsTo= and After= + dependencies on the device units or the mount units of the files + they are activated from. + - - Default Dependencies + Additional implicit dependencies may be added as result of + execution and resource control parameters as documented in + systemd.exec5 + and + systemd.resource-control5. + - The following dependencies are added unless DefaultDependencies=no is set: + + Default Dependencies - - Swap units automatically acquire a Conflicts= and a - Before= dependency on umount.target so that they are deactivated at - shutdown as well as a Before=swap.target dependency. - + The following dependencies are added unless DefaultDependencies=no is set: + + + Swap units automatically acquire a Conflicts= and a + Before= dependency on umount.target so that they are deactivated at + shutdown as well as a Before=swap.target dependency. + + diff --git a/man/systemd.target.xml b/man/systemd.target.xml index 3088a1cfdb..a5b31ec26e 100644 --- a/man/systemd.target.xml +++ b/man/systemd.target.xml @@ -69,30 +69,34 @@ - Implicit Dependencies + Automatic Dependencies - There are no implicit dependencies for target units. - + + Implicit Dependencies - - Default Dependencies + There are no implicit dependencies for target units. + - The following dependencies are added unless - DefaultDependencies=no is set: + + Default Dependencies - - Target units will automatically complement all - configured dependencies of type Wants= or - Requires= with dependencies of type - After= unless DefaultDependencies=no - is set in the specified units. Note that Wants= or - Requires= must be defined in the target unit itself — if - you for example define Wants=some.target in - some.service, the automatic ordering will not be added. + The following dependencies are added unless + DefaultDependencies=no is set: - Target units automatically gain Conflicts= - dependency against shutdown.target. - + + Target units will automatically complement all + configured dependencies of type Wants= or + Requires= with dependencies of type + After= unless DefaultDependencies=no + is set in the specified units. Note that Wants= or + Requires= must be defined in the target unit itself — if + you for example define Wants=some.target in + some.service, the automatic ordering will not be added. + + Target units automatically gain Conflicts= + dependency against shutdown.target. + + diff --git a/man/systemd.timer.xml b/man/systemd.timer.xml index 3c8d92e2cd..76a8dc4d8c 100644 --- a/man/systemd.timer.xml +++ b/man/systemd.timer.xml @@ -82,23 +82,33 @@ - Default Dependencies + Automatic Dependencies - The following dependencies are added unless DefaultDependencies=no is set: + + Implicit Dependencies - - Timer units will automatically have dependencies of type Requires= and - After= on sysinit.target, a dependency of type Before= - on timers.target, as well as Conflicts= and Before= on - shutdown.target to ensure that they are stopped cleanly prior to system shutdown. Only timer - units involved with early boot or late system shutdown should disable the - DefaultDependencies= option. + There are no implicit dependencies for timer units. + - Timer units - with at least one OnCalendar= directive will have an additional After= - dependency on time-sync.target to avoid being started before the system clock has been - correctly set. - + + Default Dependencies + + The following dependencies are added unless DefaultDependencies=no is set: + + + Timer units will automatically have dependencies of type Requires= and + After= on sysinit.target, a dependency of type Before= + on timers.target, as well as Conflicts= and Before= on + shutdown.target to ensure that they are stopped cleanly prior to system shutdown. Only timer + units involved with early boot or late system shutdown should disable the + DefaultDependencies= option. + + Timer units + with at least one OnCalendar= directive will have an additional After= + dependency on time-sync.target to avoid being started before the system clock has been + correctly set. + + diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 9264dd1472..1519ef3e6d 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -268,40 +268,40 @@ - Implicit Dependencies + Automatic dependencies - A number of unit dependencies are implicitly established, - depending on unit type and unit configuration. These implicit - dependencies can make unit configuration file cleaner. For the - implicit dependencies in each unit type, please refer to - section "Implicit Dependencies" in respective man pages. + + Implicit Dependencies - For example, service units with Type=dbus - automatically acquire dependencies of type Requires= - and After= on dbus.socket. See - systemd.service5 - for details. - + A number of unit dependencies are implicitly established, depending on unit type and + unit configuration. These implicit dependencies can make unit configuration file cleaner. For + the implicit dependencies in each unit type, please refer to section "Implicit Dependencies" + in respective man pages. - - Default Dependencies + For example, service units with Type=dbus automatically acquire + dependencies of type Requires= and After= on + dbus.socket. See + systemd.service5 + for details. + - Default dependencies are similar to implicit dependencies, - but can be turned on and off by setting - DefaultDependencies= to yes - (the default) and no, while implicit dependencies - are always in effect. See section "Default Dependencies" in respective - man pages for the effect of enabling - DefaultDependencies= in each unit types. + + Default Dependencies - For example, target units will complement all configured - dependencies of type Wants= or - Requires= with dependencies of type - After= unless DefaultDependencies=no - is set in the specified units. See - systemd.target5 - for details. Note that this behavior can be turned off by setting - DefaultDependencies=no. + Default dependencies are similar to implicit dependencies, but can be turned on and off + by setting DefaultDependencies= to yes (the default) and + no, while implicit dependencies are always in effect. See section "Default + Dependencies" in respective man pages for the effect of enabling + DefaultDependencies= in each unit types. + + For example, target units will complement all configured dependencies of type + Wants= or Requires= with dependencies of type + After= unless DefaultDependencies=no is set in the + specified units. See + systemd.target5 + for details. Note that this behavior can be turned off by setting + DefaultDependencies=no. +