| 1 | # | ||
| 2 | # This file is part of Config-Model-Systemd | ||
| 3 | # | ||
| 4 | # This software is Copyright (c) 2008-2026 by Dominique Dumont. | ||
| 5 | # | ||
| 6 | # This is free software, licensed under: | ||
| 7 | # | ||
| 8 | # The GNU Lesser General Public License, Version 2.1, February 1999 | ||
| 9 | # | ||
| 10 | 4 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 4 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 4 | ▶ | use v5.20; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | 4 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | |||
| 15 | return [ | ||
| 16 | { | ||
| 17 | 3 | 'accept' => [ | |
| 18 | '.*', | ||
| 19 | { | ||
| 20 | 'type' => 'leaf', | ||
| 21 | 'value_type' => 'uniline', | ||
| 22 | 'warn' => 'Unexpected systemd parameter. Please contact cme author to update systemd model.' | ||
| 23 | } | ||
| 24 | ], | ||
| 25 | 'class_description' => "A unit file is a plain text ini-style file that encodes information about a service, a | ||
| 26 | socket, a device, a mount point, an automount point, a swap file or partition, a start-up | ||
| 27 | target, a watched file system path, a timer controlled and supervised by | ||
| 28 | L<systemd(1)>, a | ||
| 29 | resource management slice or a group of externally created processes. See | ||
| 30 | L<systemd.syntax(7)> | ||
| 31 | for a general description of the syntax. | ||
| 32 | |||
| 33 | This man page lists the common configuration options of all | ||
| 34 | the unit types. These options need to be configured in the [Unit] | ||
| 35 | or [Install] sections of the unit files. | ||
| 36 | |||
| 37 | In addition to the generic [Unit] and [Install] sections | ||
| 38 | described here, each unit may have a type-specific section, e.g. | ||
| 39 | [Service] for a service unit. See the respective man pages for | ||
| 40 | more information: | ||
| 41 | L<systemd.service(5)>, | ||
| 42 | L<systemd.socket(5)>, | ||
| 43 | L<systemd.device(5)>, | ||
| 44 | L<systemd.mount(5)>, | ||
| 45 | L<systemd.automount(5)>, | ||
| 46 | L<systemd.swap(5)>, | ||
| 47 | L<systemd.target(5)>, | ||
| 48 | L<systemd.path(5)>, | ||
| 49 | L<systemd.timer(5)>, | ||
| 50 | L<systemd.slice(5)>, | ||
| 51 | L<systemd.scope(5)>. | ||
| 52 | |||
| 53 | |||
| 54 | Unit files are loaded from a set of paths determined during compilation, described in the next | ||
| 55 | section. | ||
| 56 | |||
| 57 | Valid unit names consist of a \"unit name prefix\", and a suffix specifying the unit type which | ||
| 58 | begins with a dot. The \"unit name prefix\" must consist of one or more valid characters (ASCII letters, | ||
| 59 | digits, C<:>, C<->, C<_>, C<.>, and | ||
| 60 | C<\\>). The total length of the unit name including the suffix must not exceed 255 | ||
| 61 | characters. The unit type suffix must be one of C<.service>, C<.socket>, | ||
| 62 | C<.device>, C<.mount>, C<.automount>, | ||
| 63 | C<.swap>, C<.target>, C<.path>, | ||
| 64 | C<.timer>, C<.slice>, or C<.scope>. | ||
| 65 | |||
| 66 | Unit names can be parameterized by a single argument called the \"instance name\". The unit is then | ||
| 67 | constructed based on a \"template file\" which serves as the definition of multiple services or other | ||
| 68 | units. A template unit must have a single C<\@> at the end of the unit name prefix (right | ||
| 69 | before the type suffix). The name of the full unit is formed by inserting the instance name between | ||
| 70 | C<\@> and the unit type suffix. In the unit file itself, the instance parameter may be | ||
| 71 | referred to using C<%i> and other specifiers, see below. | ||
| 72 | |||
| 73 | Unit files may contain additional options on top of those listed here. If systemd encounters an | ||
| 74 | unknown option, it will write a warning log message but continue loading the unit. If an option or | ||
| 75 | section name is prefixed with C<X->, it is ignored completely by systemd. Options within an | ||
| 76 | ignored section do not need the prefix. Applications may use this to include additional information in | ||
| 77 | the unit files. To access those options, applications need to parse the unit files on their own. | ||
| 78 | |||
| 79 | Units can be aliased (have an alternative name), by creating a symlink from the new name to the | ||
| 80 | existing name in one of the unit search paths. For example, C<systemd-networkd.service> | ||
| 81 | has the alias C<dbus-org.freedesktop.network1.service>, created during installation as | ||
| 82 | a symlink, so when systemd is asked through D-Bus to load | ||
| 83 | C<dbus-org.freedesktop.network1.service>, it'll load | ||
| 84 | C<systemd-networkd.service>. As another example, C<default.target> \x{2014} | ||
| 85 | the default system target started at boot \x{2014} is commonly aliased to either | ||
| 86 | C<multi-user.target> or C<graphical.target> to select what is started | ||
| 87 | by default. Alias names may be used in commands like disable, | ||
| 88 | start, stop, status, and similar, and in all | ||
| 89 | unit dependency directives, including C<Wants>, C<Requires>, | ||
| 90 | C<Before>, C<After>. Aliases cannot be used with the | ||
| 91 | preset command. | ||
| 92 | |||
| 93 | Aliases obey the following restrictions: a unit of a certain type (C<.service>, | ||
| 94 | C<.socket>, \x{2026}) can only be aliased by a name with the same type suffix. A plain unit (not | ||
| 95 | a template or an instance), may only be aliased by a plain name. A template instance may only be aliased | ||
| 96 | by another template instance, and the instance part must be identical. A template may be aliased by | ||
| 97 | another template (in which case the alias applies to all instances of the template). As a special case, a | ||
| 98 | template instance (e.g. C<alias\@inst.service>) may be a symlink to different template | ||
| 99 | (e.g. C<template\@inst.service>). In that case, just this specific instance is aliased, | ||
| 100 | while other instances of the template (e.g. C<alias\@foo.service>, | ||
| 101 | C<alias\@bar.service>) are not aliased. Those rules preserve the requirement that the | ||
| 102 | instance (if any) is always uniquely defined for a given unit and all its aliases. The target of alias | ||
| 103 | symlink must point to a valid unit file location, i.e. the symlink target name must match the symlink | ||
| 104 | source name as described, and the destination path must be in one of the unit search paths, see UNIT FILE | ||
| 105 | LOAD PATH section below for more details. Note that the target file might not exist, i.e. the symlink may | ||
| 106 | be dangling. | ||
| 107 | |||
| 108 | Unit files may specify aliases through the C<Alias> directive in the [Install] | ||
| 109 | section. When the unit is enabled, symlinks will be created for those names, and removed when the unit is | ||
| 110 | disabled. For example, C<reboot.target> specifies | ||
| 111 | C<Alias=ctrl-alt-del.target>, so when enabled, the symlink | ||
| 112 | C</etc/systemd/system/ctrl-alt-del.target> pointing to the | ||
| 113 | C<reboot.target> file will be created, and when | ||
| 114 | CtrlAltDel is invoked, | ||
| 115 | systemd will look for C<ctrl-alt-del.target>, follow the symlink to | ||
| 116 | C<reboot.target>, and execute C<reboot.service> as part of that target. | ||
| 117 | systemd does not look at the [Install] section at all during normal operation, so any | ||
| 118 | directives in that section only have an effect through the symlinks created during enablement. | ||
| 119 | |||
| 120 | Along with a unit file C<foo.service>, the directory | ||
| 121 | C<foo.service.wants/> may exist. All unit files symlinked from such a directory are | ||
| 122 | implicitly added as dependencies of type C<Wants> to the unit. Similar functionality | ||
| 123 | exists for C<Requires> type dependencies as well, the directory suffix is | ||
| 124 | C<.requires/> in this case. This functionality is useful to hook units into the | ||
| 125 | start-up of other units, without having to modify their unit files. For details about the semantics of | ||
| 126 | C<Wants> and C<Requires>, see below. The preferred way to create | ||
| 127 | symlinks in the C<.wants/> or C<.requires/> directories is by | ||
| 128 | specifying the dependency in [Install] section of the target unit, and creating the symlink in the file | ||
| 129 | system with the enable or preset commands of | ||
| 130 | L<systemctl(1)>. The | ||
| 131 | target can be a normal unit (either plain or a specific instance of a template unit). In case when the | ||
| 132 | source unit is a template, the target can also be a template, in which case the instance will be | ||
| 133 | \"propagated\" to the target unit to form a valid unit instance. The target of symlinks in | ||
| 134 | C<.wants/> or C<.requires/> must thus point to a valid unit file | ||
| 135 | location, i.e. the symlink target name must satisfy the described requirements, and the destination path | ||
| 136 | must be in one of the unit search paths, see UNIT FILE LOAD PATH section below for more details. Note | ||
| 137 | that the target file might not exist, i.e. the symlink may be dangling. | ||
| 138 | |||
| 139 | Along with a unit file C<foo.service>, a \"drop-in\" directory | ||
| 140 | C<foo.service.d/> may exist. All files with the suffix | ||
| 141 | C<.conf> from this directory will be merged in the alphanumeric order and parsed | ||
| 142 | after the main unit file itself has been parsed. This is useful to alter or add configuration | ||
| 143 | settings for a unit, without having to modify unit files. Each drop-in file must contain appropriate | ||
| 144 | section headers. For instantiated units, this logic will first look for the instance | ||
| 145 | C<.d/> subdirectory (e.g. C<foo\@bar.service.d/>) and read its | ||
| 146 | C<.conf> files, followed by the template C<.d/> subdirectory (e.g. | ||
| 147 | C<foo\@.service.d/>) and the C<.conf> files there. Moreover, for unit | ||
| 148 | names containing dashes (C<->), the set of directories generated by repeatedly | ||
| 149 | truncating the unit name after all dashes is searched too. Specifically, for a unit name | ||
| 150 | C<foo-bar-baz.service> not only the regular drop-in directory | ||
| 151 | C<foo-bar-baz.service.d/> is searched but also both C<foo-bar-.service.d/> and | ||
| 152 | C<foo-.service.d/>. This is useful for defining common drop-ins for a set of related units, whose | ||
| 153 | names begin with a common prefix. This scheme is particularly useful for mount, automount and slice units, whose | ||
| 154 | systematic naming structure is built around dashes as component separators. Note that equally named drop-in files | ||
| 155 | further down the prefix hierarchy override those further up, | ||
| 156 | i.e. C<foo-bar-.service.d/10-override.conf> overrides | ||
| 157 | C<foo-.service.d/10-override.conf>. | ||
| 158 | |||
| 159 | In cases of unit aliases (described above), dropins for the aliased name and all aliases are | ||
| 160 | loaded. In the example of C<default.target> aliasing | ||
| 161 | C<graphical.target>, C<default.target.d/>, | ||
| 162 | C<default.target.wants/>, C<default.target.requires/>, | ||
| 163 | C<graphical.target.d/>, C<graphical.target.wants/>, | ||
| 164 | C<graphical.target.requires/> would all be read. For templates, dropins for the | ||
| 165 | template, any template aliases, the template instance, and all alias instances are read. When just a | ||
| 166 | specific template instance is aliased, then the dropins for the target template, the target template | ||
| 167 | instance, and the alias template instance are read. | ||
| 168 | |||
| 169 | In addition to C</etc/systemd/system>, the drop-in C<.d/> | ||
| 170 | directories for system services can be placed in C</usr/lib/systemd/system> or | ||
| 171 | C</run/systemd/system> directories. Drop-in files in C</etc/> | ||
| 172 | take precedence over those in C</run/> which in turn take precedence over those | ||
| 173 | in C</usr/lib/>. Drop-in files under any of these directories take precedence | ||
| 174 | over unit files wherever located. Multiple drop-in files with different names are applied in | ||
| 175 | lexicographic order, regardless of which of the directories they reside in. | ||
| 176 | |||
| 177 | Units also support a top-level drop-in with C<type.d/>, | ||
| 178 | where type may be e.g. C<service> or C<socket>, | ||
| 179 | that allows altering or adding to the settings of all corresponding unit files on the system. | ||
| 180 | The formatting and precedence of applying drop-in configurations follow what is defined above. | ||
| 181 | Files in C<type.d/> have lower precedence compared | ||
| 182 | to files in name-specific override directories. The usual rules apply: multiple drop-in files | ||
| 183 | with different names are applied in lexicographic order, regardless of which of the directories | ||
| 184 | they reside in, so a file in C<type.d/> applies | ||
| 185 | to a unit only if there are no drop-ins or masks with that name in directories with higher | ||
| 186 | precedence. See Examples. | ||
| 187 | |||
| 188 | Note that while systemd offers a flexible dependency system | ||
| 189 | between units it is recommended to use this functionality only | ||
| 190 | sparingly and instead rely on techniques such as bus-based or | ||
| 191 | socket-based activation which make dependencies implicit, | ||
| 192 | resulting in a both simpler and more flexible system. | ||
| 193 | |||
| 194 | As mentioned above, a unit may be instantiated from a template file. This allows creation | ||
| 195 | of multiple units from a single configuration file. If systemd looks for a unit configuration | ||
| 196 | file, it will first search for the literal unit name in the file system. If that yields no | ||
| 197 | success and the unit name contains an C<\@> character, systemd will look for a | ||
| 198 | unit template that shares the same name but with the instance string (i.e. the part between the | ||
| 199 | C<\@> character and the suffix) removed. Example: if a service | ||
| 200 | C<getty\@tty3.service> is requested and no file by that name is found, systemd | ||
| 201 | will look for C<getty\@.service> and instantiate a service from that | ||
| 202 | configuration file if it is found. | ||
| 203 | |||
| 204 | To refer to the instance string from within the | ||
| 205 | configuration file you may use the special C<%i> | ||
| 206 | specifier in many of the configuration options. See below for | ||
| 207 | details. | ||
| 208 | |||
| 209 | If a unit file is empty (i.e. has the file size 0) or is | ||
| 210 | symlinked to C</dev/null>, its configuration | ||
| 211 | will not be loaded and it appears with a load state of | ||
| 212 | C<masked>, and cannot be activated. Use this as an | ||
| 213 | effective way to fully disable a unit, making it impossible to | ||
| 214 | start it even manually. | ||
| 215 | |||
| 216 | Files (including directories) with names that match certain patterns are | ||
| 217 | generally ignored. This includes names that start with a C<.> or | ||
| 218 | end with a C<.ignore>. | ||
| 219 | |||
| 220 | When unit aliasing is introduced during reload/reexec (e.g., converting | ||
| 221 | C<b.service> to a symlink pointing to C<a.service>), the running | ||
| 222 | state of the canonical unit (C<a.service>) is preserved. The old serialized state | ||
| 223 | of the now-aliased unit is migrated to a new stub orphaned unit to prevent stale data from | ||
| 224 | corrupting the canonical unit's live state. Dependencies referencing the alias name are automatically | ||
| 225 | resolved to the canonical unit, and the dependency graph is rebuilt from unit files, ensuring | ||
| 226 | consistency. If the now-aliased unit had resources such as running processes, they will now be tracked | ||
| 227 | under the new orphaned unit. Once all resources are gone (e.g. all processes have exited) the orphaned | ||
| 228 | unit will be garbage collected automatically. | ||
| 229 | |||
| 230 | The unit file format is covered by the | ||
| 231 | L<Interface | ||
| 232 | Portability and Stability Promise|https://systemd.io/PORTABILITY_AND_STABILITY/>. | ||
| 233 | |||
| 234 | The set of load paths for the user manager instance may be augmented or | ||
| 235 | changed using various environment variables. And environment variables may in | ||
| 236 | turn be set using environment generators, see | ||
| 237 | L<systemd.environment-generator(7)>. | ||
| 238 | In particular, C<\$XDG_DATA_HOME> and | ||
| 239 | C<\$XDG_DATA_DIRS> may be easily set using | ||
| 240 | L<systemd-environment-d-generator(8)>. | ||
| 241 | Thus, directories listed here are just the defaults. To see the actual list that | ||
| 242 | would be used based on compilation options and current environment use | ||
| 243 | |||
| 244 | |||
| 245 | systemd-analyze --user unit-paths | ||
| 246 | |||
| 247 | |||
| 248 | |||
| 249 | Moreover, additional units might be loaded into systemd from directories not on the unit load path | ||
| 250 | by creating a symlink pointing to a unit file in the directories. You can use systemctl | ||
| 251 | link for this; see | ||
| 252 | L<systemctl(1)>. The file | ||
| 253 | system where the linked unit files are located must be accessible when systemd is started (e.g. anything | ||
| 254 | underneath C</home/> or C</var/> is not allowed, unless those | ||
| 255 | directories are located on the root file system). | ||
| 256 | |||
| 257 | It is important to distinguish \"linked unit files\" from \"unit file aliases\": any symlink where the | ||
| 258 | symlink target is within the unit load path becomes an alias: the source name and | ||
| 259 | the target file name must satisfy specific constraints listed above in the discussion of aliases, but the | ||
| 260 | symlink target does not have to exist, and in fact the symlink target path is not used, except to check | ||
| 261 | whether the target is within the unit load path. In contrast, a symlink which goes outside of the unit | ||
| 262 | load path signifies a linked unit file. The symlink is followed when loading the file, but the | ||
| 263 | destination name is otherwise unused (and may even not be a valid unit file name). For example, symlinks | ||
| 264 | C</etc/systemd/system/alias1.service> \x{2192} C<service1.service>, | ||
| 265 | C</etc/systemd/system/alias2.service> \x{2192} C</usr/lib/systemd/service1.service>, | ||
| 266 | C</etc/systemd/system/alias3.service> \x{2192} C</etc/systemd/system/service1.service> | ||
| 267 | are all valid aliases and C<service1.service> will have | ||
| 268 | four names, even if the unit file is located at | ||
| 269 | C</run/systemd/system/service1.service>. In contrast, | ||
| 270 | a symlink C</etc/systemd/system/link1.service> \x{2192} C<../link1_service_file> | ||
| 271 | means that C<link1.service> is a \"linked unit\" and the contents of | ||
| 272 | C</etc/systemd/link1_service_file> provide its configuration. | ||
| 273 | |||
| 274 | Unit files may also include a number of C<Condition\x{2026}=> and C<Assert\x{2026}=> settings. Before the unit is started, systemd will verify that the | ||
| 275 | specified conditions and asserts are true. If not, the starting of the unit will be (mostly silently) | ||
| 276 | skipped (in case of conditions), or aborted with an error message (in case of asserts). Failing | ||
| 277 | conditions or asserts will not result in the unit being moved into the C<failed> | ||
| 278 | state. The conditions and asserts are checked at the time the queued start job is to be executed. The | ||
| 279 | ordering dependencies are still respected, so other units are still pulled in and ordered as if this | ||
| 280 | unit was successfully activated, and the conditions and asserts are executed the precise moment the | ||
| 281 | unit would normally start and thus can validate system state after the units ordered before completed | ||
| 282 | initialization. Use condition expressions for skipping units that do not apply to the local system, for | ||
| 283 | example because the kernel or runtime environment does not require their functionality. | ||
| 284 | |||
| 285 | |||
| 286 | If multiple conditions are specified, the unit will be executed if all of them apply (i.e. a | ||
| 287 | logical AND is applied). Condition checks can use a pipe symbol (C<|>) after the equals | ||
| 288 | sign (C<Condition\x{2026}=|\x{2026}>), which causes the condition to become a | ||
| 289 | triggering condition. If at least one triggering condition is defined for a unit, | ||
| 290 | then the unit will be started if at least one of the triggering conditions of the unit applies and all | ||
| 291 | of the regular (i.e. non-triggering) conditions apply. If you prefix an argument with the pipe symbol | ||
| 292 | and an exclamation mark, the pipe symbol must be passed first, the exclamation second. If any of these | ||
| 293 | options is assigned the empty string, the list of conditions is reset completely, all previous | ||
| 294 | condition settings (of any kind) will have no effect. | ||
| 295 | |||
| 296 | The C<AssertArchitecture>, C<AssertVirtualization>, \x{2026} options | ||
| 297 | are similar to conditions but cause the start job to fail (instead of being skipped). The failed check | ||
| 298 | is logged. Units with unmet conditions are considered to be in a clean state and will be garbage | ||
| 299 | collected if they are not referenced. This means that when queried, the condition failure may or may | ||
| 300 | not show up in the state of the unit. | ||
| 301 | |||
| 302 | Note that neither assertion nor condition expressions result in unit state changes. Also note | ||
| 303 | that both are checked at the time the job is to be executed, i.e. long after depending jobs and it | ||
| 304 | itself were queued. Thus, neither condition nor assertion expressions are suitable for conditionalizing | ||
| 305 | unit dependencies. | ||
| 306 | |||
| 307 | The condition verb of | ||
| 308 | L<systemd-analyze(1)> can | ||
| 309 | be used to test condition and assert expressions. | ||
| 310 | |||
| 311 | Except for C<ConditionPathIsSymbolicLink>, all path checks follow symlinks. | ||
| 312 | This configuration class was generated from systemd documentation. | ||
| 313 | by L<parse-man.pl|https://github.com/dod38fr/config-model-systemd/contrib/parse-man.pl> | ||
| 314 | ", | ||
| 315 | 'copyright' => [ | ||
| 316 | '2010-2016 Lennart Poettering and others', | ||
| 317 | '2016 Dominique Dumont' | ||
| 318 | ], | ||
| 319 | 'description' => { | ||
| 320 | 'After' => 'These two settings expect a space-separated list of unit names. They may be specified | ||
| 321 | more than once, in which case dependencies for all listed names are created. | ||
| 322 | |||
| 323 | Those two settings configure ordering dependencies between units. If unit | ||
| 324 | C<foo.service> contains the setting C<Before=bar.service> and both | ||
| 325 | units are being started, C<bar.service>\'s start-up is delayed until | ||
| 326 | C<foo.service> has finished starting up. C<After> is the inverse | ||
| 327 | of C<Before>, i.e. while C<Before> ensures that the configured unit | ||
| 328 | is started before the listed unit begins starting up, C<After> ensures the opposite, | ||
| 329 | that the listed unit is fully started up before the configured unit is started. | ||
| 330 | |||
| 331 | When two units with an ordering dependency between them are shut down, the inverse of the | ||
| 332 | start-up order is applied. I.e. if a unit is configured with C<After> on another | ||
| 333 | unit, the former is stopped before the latter if both are shut down. Given two units with any | ||
| 334 | ordering dependency between them, if one unit is shut down and the other is started up, the shutdown | ||
| 335 | is ordered before the start-up. It does not matter if the ordering dependency is | ||
| 336 | C<After> or C<Before>, in this case. It also does not matter which | ||
| 337 | of the two is shut down, as long as one is shut down and the other is started up; the shutdown is | ||
| 338 | ordered before the start-up in all cases. If two units have no ordering dependencies between them, | ||
| 339 | they are shut down or started up simultaneously, and no ordering takes place. It depends on the unit | ||
| 340 | type when precisely a unit has finished starting up. Most importantly, for service units start-up is | ||
| 341 | considered completed for the purpose of C<Before>/C<After> when all | ||
| 342 | its configured start-up commands have been invoked and they either failed or reported start-up | ||
| 343 | success. Note that this includes C<ExecStartPost> (or | ||
| 344 | C<ExecStopPost> for the shutdown case). | ||
| 345 | |||
| 346 | Note that those settings are independent of and orthogonal to the requirement dependencies as | ||
| 347 | configured by C<Requires>, C<Wants>, C<Requisite>, | ||
| 348 | or C<BindsTo>. It is a common pattern to include a unit name in both the | ||
| 349 | C<After> and C<Wants> options, in which case the unit listed will | ||
| 350 | be started before the unit that is configured with these options. | ||
| 351 | |||
| 352 | Note that C<Before> dependencies on device units have no effect and are not | ||
| 353 | supported. Devices generally become available as a result of an external hotplug event, and systemd | ||
| 354 | creates the corresponding device unit without delay.', | ||
| 355 | 'AllowIsolate' => 'Takes a boolean argument. If | ||
| 356 | C<true>, this unit may be used with the | ||
| 357 | systemctl isolate command. Otherwise, this | ||
| 358 | will be refused. It probably is a good idea to leave this | ||
| 359 | disabled except for target units that shall be used similar to | ||
| 360 | runlevels in SysV init systems, just as a precaution to avoid | ||
| 361 | unusable system states. This option defaults to | ||
| 362 | C<false>.', | ||
| 363 | 'AssertACPower' => "Similar to the C<ConditionArchitecture>, | ||
| 364 | C<ConditionVirtualization>, \x{2026}, condition settings described above, these settings | ||
| 365 | add assertion checks to the start-up of the unit. However, unlike the conditions settings, any | ||
| 366 | assertion setting that is not met results in failure of the start job (which means this is logged | ||
| 367 | loudly). Note that hitting a configured assertion does not cause the unit to enter the | ||
| 368 | C<failed> state (or in fact result in any state change of the unit), it affects | ||
| 369 | only the job queued for it. Use assertion expressions for units that cannot operate when specific | ||
| 370 | requirements are not met, and when this is something the administrator or user should look | ||
| 371 | into.", | ||
| 372 | 'AssertArchitecture' => '*AssertACPower', | ||
| 373 | 'AssertCPUFeature' => '*AssertACPower', | ||
| 374 | 'AssertCPUPressure' => '*AssertACPower', | ||
| 375 | 'AssertCPUs' => '*AssertACPower', | ||
| 376 | 'AssertCapability' => '*AssertACPower', | ||
| 377 | 'AssertControlGroupController' => '*AssertACPower', | ||
| 378 | 'AssertCredential' => '*AssertACPower', | ||
| 379 | 'AssertDirectoryNotEmpty' => '*AssertACPower', | ||
| 380 | 'AssertEnvironment' => '*AssertACPower', | ||
| 381 | 'AssertFileIsExecutable' => '*AssertACPower', | ||
| 382 | 'AssertFileNotEmpty' => '*AssertACPower', | ||
| 383 | 'AssertFirstBoot' => '*AssertACPower', | ||
| 384 | 'AssertFraction' => '*AssertACPower', | ||
| 385 | 'AssertGroup' => '*AssertACPower', | ||
| 386 | 'AssertHost' => '*AssertACPower', | ||
| 387 | 'AssertIOPressure' => '*AssertACPower', | ||
| 388 | 'AssertKernelCommandLine' => '*AssertACPower', | ||
| 389 | 'AssertKernelModuleLoaded' => '*AssertACPower', | ||
| 390 | 'AssertKernelVersion' => '*AssertACPower', | ||
| 391 | 'AssertMachineTag' => '*AssertACPower', | ||
| 392 | 'AssertMemory' => '*AssertACPower', | ||
| 393 | 'AssertMemoryPressure' => '*AssertACPower', | ||
| 394 | 'AssertNeedsUpdate' => '*AssertACPower', | ||
| 395 | 'AssertOSRelease' => '*AssertACPower', | ||
| 396 | 'AssertPathExists' => '*AssertACPower', | ||
| 397 | 'AssertPathExistsGlob' => '*AssertACPower', | ||
| 398 | 'AssertPathIsDirectory' => '*AssertACPower', | ||
| 399 | 'AssertPathIsEncrypted' => '*AssertACPower', | ||
| 400 | 'AssertPathIsMountPoint' => '*AssertACPower', | ||
| 401 | 'AssertPathIsReadWrite' => '*AssertACPower', | ||
| 402 | 'AssertPathIsSocket' => '*AssertACPower', | ||
| 403 | 'AssertPathIsSymbolicLink' => '*AssertACPower', | ||
| 404 | 'AssertSecurity' => '*AssertACPower', | ||
| 405 | 'AssertUser' => '*AssertACPower', | ||
| 406 | 'AssertVersion' => '*AssertACPower', | ||
| 407 | 'AssertVirtualization' => '*AssertACPower', | ||
| 408 | 'Before' => '*After', | ||
| 409 | 'BindsTo' => "Configures requirement dependencies, very similar in style to | ||
| 410 | C<Requires>. However, this dependency type is stronger: in addition to the effects of | ||
| 411 | C<Requires>, which already stops (or restarts) the configuring unit when a listed unit is | ||
| 412 | explicitly stopped (or restarted), it also does so when a listed unit stops unexpectedly (which includes when it | ||
| 413 | fails). | ||
| 414 | Units can suddenly, unexpectedly enter inactive state for different reasons: the main process of a service unit | ||
| 415 | might terminate on its own choice, the backing device of a device unit might be unplugged or the mount point of | ||
| 416 | a mount unit might be unmounted without involvement of the system and service manager. | ||
| 417 | |||
| 418 | When used in conjunction with C<After> on the same unit the behaviour of | ||
| 419 | C<BindsTo> is even stronger. In this case, the unit bound to strictly has to be in active | ||
| 420 | state for this unit to also be in active state. This not only means a unit bound to another unit that suddenly | ||
| 421 | enters inactive state, but also one that is bound to another unit that gets skipped due to an unmet condition | ||
| 422 | check (such as C<ConditionPathExists>, C<ConditionPathIsSymbolicLink>, \x{2026} \x{2014} | ||
| 423 | see below) will be stopped, should it be running. Hence, in many cases it is best to combine | ||
| 424 | C<BindsTo> with C<After>. | ||
| 425 | |||
| 426 | When C<BindsTo=b.service> is used on | ||
| 427 | C<a.service>, this dependency will show as | ||
| 428 | C<BoundBy=a.service> in property listing of | ||
| 429 | C<b.service>. C<BoundBy> | ||
| 430 | dependency cannot be specified directly.", | ||
| 431 | 'CollectMode' => "Tweaks the \"garbage collection\" algorithm for this unit. Takes one of C<inactive> | ||
| 432 | or C<inactive-or-failed>. If set to C<inactive> the unit will be unloaded if it is | ||
| 433 | in the C<inactive> state and is not referenced by clients, jobs or other units \x{2014} however it | ||
| 434 | is not unloaded if it is in the C<failed> state. In C<failed> mode, failed | ||
| 435 | units are not unloaded until the user invoked systemctl reset-failed on them to reset the | ||
| 436 | C<failed> state, or an equivalent command. This behaviour is altered if this option is set to | ||
| 437 | C<inactive-or-failed>: in this case, the unit is unloaded even if the unit is in a | ||
| 438 | C<failed> state, and thus an explicitly resetting of the C<failed> state is | ||
| 439 | not necessary. Note that if this mode is used unit results (such as exit codes, exit signals, consumed | ||
| 440 | resources, \x{2026}) are flushed out immediately after the unit completed, except for what is stored in the logging | ||
| 441 | subsystem. Defaults to C<inactive>. | ||
| 442 | |||
| 443 | Since v261, if C<FileDescriptorStorePreserve> is set to C<yes>, | ||
| 444 | and the unit has file descriptors stored, garbage collection will be disabled until the unit is | ||
| 445 | removed, the service manager exits, or the file descriptors get C<EPOLLHUP> or | ||
| 446 | C<EPOLLERR>.", | ||
| 447 | 'ConditionACPower' => 'Check whether the system has AC power, or is exclusively battery powered at the | ||
| 448 | time of activation of the unit. This takes a boolean argument. If set to C<true>, | ||
| 449 | the condition will hold only if at least one AC connector of the system is connected to a power | ||
| 450 | source, or if no AC connectors are known. Conversely, if set to C<false>, the | ||
| 451 | condition will hold only if there is at least one AC connector known and all AC connectors are | ||
| 452 | disconnected from a power source.', | ||
| 453 | 'ConditionArchitecture' => 'Check whether the system is running on a specific architecture. Takes one of | ||
| 454 | C<x86>, | ||
| 455 | C<x86-64>, | ||
| 456 | C<ppc>, | ||
| 457 | C<ppc-le>, | ||
| 458 | C<ppc64>, | ||
| 459 | C<ppc64-le>, | ||
| 460 | C<ia64>, | ||
| 461 | C<parisc>, | ||
| 462 | C<parisc64>, | ||
| 463 | C<s390>, | ||
| 464 | C<s390x>, | ||
| 465 | C<sparc>, | ||
| 466 | C<sparc64>, | ||
| 467 | C<mips>, | ||
| 468 | C<mips-le>, | ||
| 469 | C<mips64>, | ||
| 470 | C<mips64-le>, | ||
| 471 | C<alpha>, | ||
| 472 | C<arm>, | ||
| 473 | C<arm-be>, | ||
| 474 | C<arm64>, | ||
| 475 | C<arm64-be>, | ||
| 476 | C<sh>, | ||
| 477 | C<sh64>, | ||
| 478 | C<m68k>, | ||
| 479 | C<tilegx>, | ||
| 480 | C<cris>, | ||
| 481 | C<arc>, | ||
| 482 | C<arc-be>, or | ||
| 483 | C<native>. | ||
| 484 | |||
| 485 | Use | ||
| 486 | L<systemd-analyze(1)> | ||
| 487 | for the complete list of known architectures. | ||
| 488 | |||
| 489 | The architecture is determined from the information returned by | ||
| 490 | L<uname(2)> | ||
| 491 | and is thus subject to | ||
| 492 | L<personality(2)>. | ||
| 493 | Note that a C<Personality> setting in the same unit file has no effect on this | ||
| 494 | condition. A special architecture name C<native> is mapped to the architecture the | ||
| 495 | system manager itself is compiled for. The test may be negated by prepending an exclamation | ||
| 496 | mark.', | ||
| 497 | 'ConditionCPUFeature' => 'Verify that a given CPU feature is available via the C<CPUID> | ||
| 498 | instruction. This condition only does something on i386 and x86-64 processors. On other | ||
| 499 | processors it is assumed that the CPU does not support the given feature. It checks the leaves | ||
| 500 | C<1>, C<7>, C<0x80000001>, and | ||
| 501 | C<0x80000007>. Valid values are: | ||
| 502 | C<fpu>, | ||
| 503 | C<vme>, | ||
| 504 | C<de>, | ||
| 505 | C<pse>, | ||
| 506 | C<tsc>, | ||
| 507 | C<msr>, | ||
| 508 | C<pae>, | ||
| 509 | C<mce>, | ||
| 510 | C<cx8>, | ||
| 511 | C<apic>, | ||
| 512 | C<sep>, | ||
| 513 | C<mtrr>, | ||
| 514 | C<pge>, | ||
| 515 | C<mca>, | ||
| 516 | C<cmov>, | ||
| 517 | C<pat>, | ||
| 518 | C<pse36>, | ||
| 519 | C<clflush>, | ||
| 520 | C<mmx>, | ||
| 521 | C<fxsr>, | ||
| 522 | C<sse>, | ||
| 523 | C<sse2>, | ||
| 524 | C<ht>, | ||
| 525 | C<pni>, | ||
| 526 | C<pclmul>, | ||
| 527 | C<monitor>, | ||
| 528 | C<ssse3>, | ||
| 529 | C<fma3>, | ||
| 530 | C<cx16>, | ||
| 531 | C<sse4_1>, | ||
| 532 | C<sse4_2>, | ||
| 533 | C<movbe>, | ||
| 534 | C<popcnt>, | ||
| 535 | C<aes>, | ||
| 536 | C<xsave>, | ||
| 537 | C<osxsave>, | ||
| 538 | C<avx>, | ||
| 539 | C<f16c>, | ||
| 540 | C<rdrand>, | ||
| 541 | C<bmi1>, | ||
| 542 | C<avx2>, | ||
| 543 | C<bmi2>, | ||
| 544 | C<rdseed>, | ||
| 545 | C<adx>, | ||
| 546 | C<sha_ni>, | ||
| 547 | C<syscall>, | ||
| 548 | C<rdtscp>, | ||
| 549 | C<lm>, | ||
| 550 | C<lahf_lm>, | ||
| 551 | C<abm>, | ||
| 552 | C<constant_tsc>.', | ||
| 553 | 'ConditionCPUPressure' => 'Verify that the overall system (memory, CPU or IO) pressure is below or equal to a threshold. | ||
| 554 | This setting takes a threshold value as argument. It can be specified as a simple percentage value, | ||
| 555 | suffixed with C<%>, in which case the pressure will be measured as an average over the last | ||
| 556 | five minutes before the attempt to start the unit is performed. | ||
| 557 | Alternatively, the average timespan can also be specified using C</> as a separator, for | ||
| 558 | example: C<10%/1min>. The supported timespans match what the kernel provides, and are | ||
| 559 | limited to C<10sec>, C<1min> and C<5min>. The | ||
| 560 | C<full> PSI will be checked first, and if not found C<some> will be | ||
| 561 | checked. For more details, see the documentation on L<PSI (Pressure Stall | ||
| 562 | Information)|https://docs.kernel.org/accounting/psi.html>. | ||
| 563 | |||
| 564 | Optionally, the threshold value can be prefixed with the slice unit under which the pressure will be checked, | ||
| 565 | followed by a C<:>. If the slice unit is not specified, the overall system pressure will be measured, | ||
| 566 | instead of a particular cgroup\'s.', | ||
| 567 | 'ConditionCPUs' => 'Verify that the specified number of CPUs is available to the current system. Takes | ||
| 568 | a number of CPUs as argument, optionally prefixed with a comparison operator | ||
| 569 | C<< < >>, C<< <= >>, C<=> (or C<==>), | ||
| 570 | C<!=> (or C<< <> >>), C<< >= >>, | ||
| 571 | C<< > >>. Compares the number of CPUs in the CPU affinity mask configured of the | ||
| 572 | service manager itself with the specified number, adhering to the specified comparison operator. On | ||
| 573 | physical systems the number of CPUs in the affinity mask of the service manager usually matches the | ||
| 574 | number of physical CPUs, but in special and virtual environments might differ. In particular, in | ||
| 575 | containers the affinity mask usually matches the number of CPUs assigned to the container and not | ||
| 576 | the physically available ones.', | ||
| 577 | 'ConditionCapability' => 'Check whether the given capability exists in the capability bounding set of the | ||
| 578 | service manager (i.e. this does not check whether capability is actually available in the permitted | ||
| 579 | or effective sets, see | ||
| 580 | L<capabilities(7)> | ||
| 581 | for details). Pass a capability name such as C<CAP_MKNOD>, possibly prefixed with | ||
| 582 | an exclamation mark to negate the check.', | ||
| 583 | 'ConditionControlGroupController' => 'Check whether given cgroup controllers (e.g. C<cpu>) are available | ||
| 584 | for use on the system or whether the legacy v1 cgroup or the modern v2 cgroup hierarchy is used. | ||
| 585 | |||
| 586 | Multiple controllers may be passed with a space separating them; in this case, the condition | ||
| 587 | will only pass if all listed controllers are available for use. Controllers unknown to systemd are | ||
| 588 | ignored. Valid controllers are C<cpu>, C<io>, | ||
| 589 | C<memory>, and C<pids>. Even if available in the kernel, a | ||
| 590 | particular controller may not be available if it was disabled on the kernel command line with | ||
| 591 | C<cgroup_disable=controller>. | ||
| 592 | |||
| 593 | Alternatively, two special strings C<v1> and C<v2> may be | ||
| 594 | specified (without any controller names). C<v2> will pass if the unified v2 cgroup | ||
| 595 | hierarchy is used, and C<v1> will pass if the legacy v1 hierarchy or the hybrid | ||
| 596 | hierarchy are used. Note that legacy or hybrid hierarchies have been deprecated. See | ||
| 597 | L<systemd(1)> for | ||
| 598 | more information.', | ||
| 599 | 'ConditionCredential' => 'C<ConditionCredential> may be used to check whether a credential | ||
| 600 | by the specified name was passed into the service manager. See L<System and Service | ||
| 601 | Credentials|https://systemd.io/CREDENTIALS> for details about | ||
| 602 | credentials. If used in services for the system service manager this may be used to conditionalize | ||
| 603 | services based on system credentials passed in. If used in services for the per-user service | ||
| 604 | manager this may be used to conditionalize services based on credentials passed into the | ||
| 605 | C<unit@.service> service instance belonging to the user. The argument must be a | ||
| 606 | valid credential name.', | ||
| 607 | 'ConditionDirectoryNotEmpty' => 'C<ConditionDirectoryNotEmpty> is similar to | ||
| 608 | C<ConditionPathExists> but verifies that a certain path exists and is a non-empty | ||
| 609 | directory.', | ||
| 610 | 'ConditionEnvironment' => "C<ConditionEnvironment> may be used to check whether a specific | ||
| 611 | environment variable is set (or if prefixed with the exclamation mark \x{2014} unset) in the service | ||
| 612 | manager's environment block. | ||
| 613 | The argument may be a single word, to check if the variable with this name is defined in the | ||
| 614 | environment block, or an assignment | ||
| 615 | (C<name=value>), to check if | ||
| 616 | the variable with this exact value is defined. Note that the environment block of the service | ||
| 617 | manager itself is checked, i.e. not any variables defined with C<Environment> or | ||
| 618 | C<EnvironmentFile>, as described above. This is particularly useful when the | ||
| 619 | service manager runs inside a containerized environment or as per-user service manager, in order to | ||
| 620 | check for variables passed in by the enclosing container manager or PAM.", | ||
| 621 | 'ConditionFileIsExecutable' => 'C<ConditionFileIsExecutable> is similar to | ||
| 622 | C<ConditionPathExists> but verifies that a certain path exists, is a regular file, | ||
| 623 | and marked executable.', | ||
| 624 | 'ConditionFileNotEmpty' => 'C<ConditionFileNotEmpty> is similar to | ||
| 625 | C<ConditionPathExists> but verifies that a certain path exists and refers to a | ||
| 626 | regular file with a non-zero size.', | ||
| 627 | 'ConditionFirmware' => 'Check whether the system\'s firmware is of a certain type. The following values are | ||
| 628 | possible:', | ||
| 629 | 'ConditionFirstBoot' => 'Takes a boolean argument. This condition may be used to conditionalize units on | ||
| 630 | whether the system is booting up for the first time. This roughly means that C</etc/> | ||
| 631 | was unpopulated when the system started booting (for details, see "First Boot Semantics" in | ||
| 632 | L<machine-id(5)>). | ||
| 633 | First Boot is considered finished (this condition will evaluate as false) after the manager | ||
| 634 | has finished the startup phase. | ||
| 635 | |||
| 636 | This condition may be used to populate C</etc/> on the first boot after | ||
| 637 | factory reset, or when a new system instance boots up for the first time. | ||
| 638 | |||
| 639 | Note that the service manager itself will perform setup steps during First Boot: it will | ||
| 640 | initialize | ||
| 641 | L<machine-id(5)> and | ||
| 642 | preset all units, enabling or disabling them according to the | ||
| 643 | L<systemd.preset(5)> | ||
| 644 | settings. Additional setup may be performed via units with | ||
| 645 | C<ConditionFirstBoot=yes>. | ||
| 646 | |||
| 647 | For robustness, units with C<ConditionFirstBoot=yes> should order themselves | ||
| 648 | before C<first-boot-complete.target> and pull in this passive target with | ||
| 649 | C<Wants>. This ensures that in a case of an aborted first boot, these units will | ||
| 650 | be re-run during the next system startup. | ||
| 651 | |||
| 652 | If the C<systemd.condition_first_boot=> option is specified on the kernel | ||
| 653 | command line (taking a boolean), it will override the result of this condition check, taking | ||
| 654 | precedence over C</etc/machine-id> existence checks.', | ||
| 655 | 'ConditionFraction' => "C<ConditionFraction> may be used to enable a unit on a stable, | ||
| 656 | pseudo-random subset of a fleet of machines. It is primarily useful for staged rollouts: the same | ||
| 657 | unit (or drop-in) is distributed to every machine in a fleet, but only the configured fraction of | ||
| 658 | them will actually have it enabled. The decision is derived locally from the machine ID (see | ||
| 659 | L<machine-id(5)>), so | ||
| 660 | it requires no central coordination and is stable over time: a given machine always lands on the | ||
| 661 | same side of the threshold. | ||
| 662 | |||
| 663 | The argument consists of an optional tag followed by a percentage, | ||
| 664 | separated by whitespace, for example C<30%> or | ||
| 665 | C<myrollout 30%>. The percentage may include up to two decimal places (e.g. | ||
| 666 | C<0.5%>). The condition is satisfied on approximately the configured percentage of | ||
| 667 | all machines; C<0%> matches no machine and C<100%> matches every | ||
| 668 | machine. | ||
| 669 | |||
| 670 | The optional tag is an arbitrary string (not containing whitespace) that is mixed into the | ||
| 671 | derivation, so that independent rollouts select independent subsets of the | ||
| 672 | fleet. Without it, all untagged C<ConditionFraction> checks would select the very | ||
| 673 | same machines (the same machines would always be picked first). Use distinct tags for unrelated | ||
| 674 | rollouts, and a shared tag to deliberately target the same machines across several units. | ||
| 675 | |||
| 676 | The test may be negated by prepending an exclamation mark, in which case it is satisfied on the | ||
| 677 | complementary fraction of machines (e.g. C<!myrollout 30%> matches the other \x{2248}70%). | ||
| 678 | If the machine ID cannot be determined, the condition fails.", | ||
| 679 | 'ConditionGroup' => 'C<ConditionGroup> is similar to C<ConditionUser> | ||
| 680 | but verifies that the service manager\'s real or effective group, or any of its auxiliary groups, | ||
| 681 | match the specified group or GID. This setting does not support the special value | ||
| 682 | C<@system>.', | ||
| 683 | 'ConditionHost' => 'C<ConditionHost> may be used to match against the hostname, | ||
| 684 | machine ID, boot ID or product UUID of the host. This either takes a hostname string (optionally | ||
| 685 | with shell style globs) which is tested against the locally set hostname as returned by | ||
| 686 | L<gethostname(2)>, or | ||
| 687 | a 128bit ID or UUID, formatted as string. The latter is compared against machine ID, boot ID and the | ||
| 688 | firmware product UUID if there is any. See | ||
| 689 | L<machine-id(5)> for | ||
| 690 | details about the machine ID. The test may be negated by prepending an exclamation mark.', | ||
| 691 | 'ConditionIOPressure' => '*ConditionCPUPressure', | ||
| 692 | 'ConditionKernelCommandLine' => "C<ConditionKernelCommandLine> may be used to check whether a | ||
| 693 | specific kernel command line option is set (or if prefixed with the exclamation mark \x{2014} unset). The | ||
| 694 | argument must either be a single word, or an assignment (i.e. two words, separated by | ||
| 695 | C<=>). In the former case the kernel command line is searched for the word | ||
| 696 | appearing as is, or as left hand side of an assignment. In the latter case, the exact assignment is | ||
| 697 | looked for with right and left hand side matching. This operates on the kernel command line | ||
| 698 | communicated to userspace via C</proc/cmdline>, except when the service manager | ||
| 699 | is invoked as payload of a container manager, in which case the command line of C<PID | ||
| 700 | 1> is used instead (i.e. C</proc/1/cmdline>).", | ||
| 701 | 'ConditionKernelModuleLoaded' => 'Test whether the specified kernel module has been loaded and is already fully | ||
| 702 | initialized.', | ||
| 703 | 'ConditionKernelVersion' => 'C<ConditionKernelVersion> may be used to check whether the kernel | ||
| 704 | version (as reported by uname -r) matches a certain expression, or if prefixed | ||
| 705 | with the exclamation mark, does not match. The argument must be a list of (potentially quoted) | ||
| 706 | expressions. Each expression starts with one of C<=> or C<!=> for | ||
| 707 | string comparisons, C<< < >>, C<< <= >>, C<==>, | ||
| 708 | C<< <> >>, C<< >= >>, C<< > >> for version | ||
| 709 | comparisons, or C<$=>, C<!$=> for a shell-style glob match. If no | ||
| 710 | operator is specified, C<$=> is implied. | ||
| 711 | |||
| 712 | Note that using the kernel version string is an unreliable way to determine which features | ||
| 713 | are supported by a kernel, because of the widespread practice of backporting drivers, features, and | ||
| 714 | fixes from newer upstream kernels into older versions provided by distributions. Hence, this check | ||
| 715 | is inherently unportable and should not be used for units which may be used on different | ||
| 716 | distributions.', | ||
| 717 | 'ConditionMachineTag' => 'C<ConditionMachineTag> may be used to match against the tags | ||
| 718 | assigned to the local machine. Machine tags are short labels that classify and group machines for | ||
| 719 | management purposes; they are configured in the C<TAGS> field of | ||
| 720 | L<machine-info(5)> and | ||
| 721 | may be queried and changed with the tags command of | ||
| 722 | L<hostnamectl(1)>. The | ||
| 723 | argument is a single tag pattern, which is compared against each of the configured tags using | ||
| 724 | shell-style globbing (C<*>, C<?>, C<[]>). The | ||
| 725 | condition is satisfied if at least one of the configured tags matches the pattern. The test may be | ||
| 726 | negated by prepending an exclamation mark, in which case it is satisfied if none of the configured | ||
| 727 | tags matches.', | ||
| 728 | 'ConditionMemory' => 'Verify that the specified amount of system memory is available to the current | ||
| 729 | system. Takes a memory size in bytes as argument, optionally prefixed with a comparison operator | ||
| 730 | C<< < >>, C<< <= >>, C<=> (or C<==>), | ||
| 731 | C<!=> (or C<< <> >>), C<< >= >>, | ||
| 732 | C<< > >>. On bare-metal systems compares the amount of physical memory in the system | ||
| 733 | with the specified size, adhering to the specified comparison operator. In containers compares the | ||
| 734 | amount of memory assigned to the container instead.', | ||
| 735 | 'ConditionMemoryPressure' => '*ConditionCPUPressure', | ||
| 736 | 'ConditionNeedsUpdate' => 'Takes one of C</var/> or C</etc/> as argument, | ||
| 737 | possibly prefixed with a C<!> (to invert the condition). This condition may be | ||
| 738 | used to conditionalize units on whether the specified directory requires an update because | ||
| 739 | C</usr/>\'s modification time is newer than the stamp file | ||
| 740 | C<.updated> in the specified directory. This is useful to implement offline | ||
| 741 | updates of the vendor operating system resources in C</usr/> that require updating | ||
| 742 | of C</etc/> or C</var/> on the next following boot. Units making | ||
| 743 | use of this condition should order themselves before | ||
| 744 | L<systemd-update-done.service(8)>, | ||
| 745 | to make sure they run before the stamp file\'s modification time gets reset indicating a completed | ||
| 746 | update. | ||
| 747 | |||
| 748 | If the C<systemd.condition_needs_update=> option is specified on the kernel | ||
| 749 | command line (taking a boolean), it will override the result of this condition check, taking | ||
| 750 | precedence over any file modification time checks. If the kernel command line option is used, | ||
| 751 | C<systemd-update-done.service> will not have immediate effect on any following | ||
| 752 | C<ConditionNeedsUpdate> checks, until the system is rebooted where the kernel | ||
| 753 | command line option is not specified anymore. | ||
| 754 | |||
| 755 | Note that to make this scheme effective, the timestamp of C</usr/> should | ||
| 756 | be explicitly updated after its contents are modified. The kernel will automatically update | ||
| 757 | modification timestamp on a directory only when immediate children of a directory are modified; an | ||
| 758 | modification of nested files will not automatically result in mtime of C</usr/> | ||
| 759 | being updated. | ||
| 760 | |||
| 761 | Also note that if the update method includes a call to execute appropriate post-update steps | ||
| 762 | itself, it should not touch the timestamp of C</usr/>. In a typical distribution | ||
| 763 | packaging scheme, packages will do any required update steps as part of the installation or | ||
| 764 | upgrade, to make package contents immediately usable. C<ConditionNeedsUpdate> | ||
| 765 | should be used with other update mechanisms where such an immediate update does not | ||
| 766 | happen.', | ||
| 767 | 'ConditionOSRelease' => 'Verify that a specific C<key=value> pair is set in the host\'s | ||
| 768 | L<os-release(5)>. | ||
| 769 | |||
| 770 | Other than exact string matching (with C<=> and C<!=>), | ||
| 771 | relative comparisons are supported for versioned parameters (e.g. C<VERSION_ID>; | ||
| 772 | with C<< < >>, C<< <= >>, C<==>, | ||
| 773 | C<< <> >>, C<< >= >>, C<< > >>), and shell-style | ||
| 774 | wildcard comparisons (C<*>, C<?>, C<[]>) are | ||
| 775 | supported with the C<$=> (match) and C<!$=> (non-match). | ||
| 776 | |||
| 777 | If the given key is not found in the file, the match is done against an empty value.', | ||
| 778 | 'ConditionPathExists' => 'Check for the existence of a file. If the specified absolute path name does not exist, | ||
| 779 | the condition will fail. If the absolute path name passed to | ||
| 780 | C<ConditionPathExists> is prefixed with an exclamation mark | ||
| 781 | (C<!>), the test is negated, and the unit is only started if the path does not | ||
| 782 | exist.', | ||
| 783 | 'ConditionPathExistsGlob' => 'C<ConditionPathExistsGlob> is similar to | ||
| 784 | C<ConditionPathExists>, but checks for the existence of at least one file or | ||
| 785 | directory matching the specified globbing pattern.', | ||
| 786 | 'ConditionPathIsDirectory' => 'C<ConditionPathIsDirectory> is similar to | ||
| 787 | C<ConditionPathExists> but verifies that a certain path exists and is a | ||
| 788 | directory.', | ||
| 789 | 'ConditionPathIsEncrypted' => 'C<ConditionPathIsEncrypted> is similar to | ||
| 790 | C<ConditionPathExists> but verifies that the underlying file system\'s backing | ||
| 791 | block device is encrypted using dm-crypt/LUKS. Note that this check does not cover ext4 | ||
| 792 | per-directory encryption, and only detects block level encryption. Moreover, if the specified path | ||
| 793 | resides on a file system on top of a loopback block device, only encryption above the loopback device is | ||
| 794 | detected. It is not detected whether the file system backing the loopback block device is encrypted.', | ||
| 795 | 'ConditionPathIsMountPoint' => 'C<ConditionPathIsMountPoint> is similar to | ||
| 796 | C<ConditionPathExists> but verifies that a certain path exists and is a mount | ||
| 797 | point.', | ||
| 798 | 'ConditionPathIsReadWrite' => 'C<ConditionPathIsReadWrite> is similar to | ||
| 799 | C<ConditionPathExists> but verifies that the underlying file system is readable | ||
| 800 | and writable (i.e. not mounted read-only).', | ||
| 801 | 'ConditionPathIsSocket' => 'C<ConditionPathIsSocket> is similar to | ||
| 802 | C<ConditionPathExists> but verifies that a certain path exists and is a | ||
| 803 | socket.', | ||
| 804 | 'ConditionPathIsSymbolicLink' => 'C<ConditionPathIsSymbolicLink> is similar to | ||
| 805 | C<ConditionPathExists> but verifies that a certain path exists and is a symbolic | ||
| 806 | link.', | ||
| 807 | 'ConditionSecurity' => 'C<ConditionSecurity> may be used to check whether the given | ||
| 808 | security technology is enabled on the system. Currently, the following values are recognized: | ||
| 809 | |||
| 810 | The test may be negated by prepending an exclamation mark.', | ||
| 811 | 'ConditionUser' => 'C<ConditionUser> takes a numeric C<UID>, a UNIX | ||
| 812 | user name, or the special value C<@system>. This condition may be used to check | ||
| 813 | whether the service manager is running as the given user. The special value | ||
| 814 | C<@system> can be used to check if the user id is within the system user | ||
| 815 | range. This option is not useful for system services, as the system manager exclusively runs as the | ||
| 816 | root user, and thus the test result is constant.', | ||
| 817 | 'ConditionVersion' => 'C<ConditionVersion> may be used to check whether a software | ||
| 818 | version matches a certain expression, or if prefixed with the exclamation mark, does not match. | ||
| 819 | The first argument is the software whose version has to be checked. Currently | ||
| 820 | C<kernel>, C<systemd> and C<glibc> are supported. | ||
| 821 | If this argument is omitted, C<kernel> is implied. The second argument must be a | ||
| 822 | list of (potentially quoted) expressions. Each expression starts with one of C<=> | ||
| 823 | or C<!=> for string comparisons, C<< < >>, C<< <= >>, | ||
| 824 | C<==>, C<< <> >>, C<< >= >>, | ||
| 825 | C<< > >> for version comparisons, or C<$=>, C<!$=> | ||
| 826 | for a shell-style glob match. If no operator is specified, C<$=> is implied.', | ||
| 827 | 'ConditionVirtualization' => 'Check whether the system is executed in a virtualized environment and optionally | ||
| 828 | test whether it is a specific implementation. Takes either boolean value to check if being executed | ||
| 829 | in any virtualized environment, or one of | ||
| 830 | C<vm> and | ||
| 831 | C<container> to test against a generic type of virtualization solution, or one of | ||
| 832 | C<qemu>, | ||
| 833 | C<kvm>, | ||
| 834 | C<amazon>, | ||
| 835 | C<zvm>, | ||
| 836 | C<vmware>, | ||
| 837 | C<microsoft>, | ||
| 838 | C<oracle>, | ||
| 839 | C<powervm>, | ||
| 840 | C<xen>, | ||
| 841 | C<bochs>, | ||
| 842 | C<uml>, | ||
| 843 | C<bhyve>, | ||
| 844 | C<qnx>, | ||
| 845 | C<apple>, | ||
| 846 | C<sre>, | ||
| 847 | C<openvz>, | ||
| 848 | C<lxc>, | ||
| 849 | C<lxc-libvirt>, | ||
| 850 | C<systemd-nspawn>, | ||
| 851 | C<docker>, | ||
| 852 | C<podman>, | ||
| 853 | C<rkt>, | ||
| 854 | C<wsl>, | ||
| 855 | C<proot>, | ||
| 856 | C<pouch>, | ||
| 857 | C<acrn> to test | ||
| 858 | against a specific implementation, or | ||
| 859 | C<private-users> to check whether we are running in a user namespace. See | ||
| 860 | L<systemd-detect-virt(1)> | ||
| 861 | for a full list of known virtualization technologies and their identifiers. If multiple | ||
| 862 | virtualization technologies are nested, only the innermost is considered. The test may be negated | ||
| 863 | by prepending an exclamation mark.', | ||
| 864 | 'Conflicts' => 'A space-separated list of unit names. Configures negative requirement | ||
| 865 | dependencies. If a unit has a C<Conflicts> requirement on a set of other units, | ||
| 866 | then starting it will stop all of them and starting any of them will stop it. | ||
| 867 | |||
| 868 | Note that this setting does not imply an ordering dependency, similarly to the | ||
| 869 | C<Wants> and C<Requires> dependencies described above. This means | ||
| 870 | that to ensure that the conflicting unit is stopped before the other unit is started, an | ||
| 871 | C<After> or C<Before> dependency must be declared. It does not | ||
| 872 | matter which of the two ordering dependencies is used, because stop jobs are always ordered before | ||
| 873 | start jobs, see the discussion in C<Before>/C<After> below. | ||
| 874 | |||
| 875 | If unit A that conflicts with unit B is scheduled to | ||
| 876 | be started at the same time as B, the transaction will either | ||
| 877 | fail (in case both are required parts of the transaction) or be | ||
| 878 | modified to be fixed (in case one or both jobs are not a | ||
| 879 | required part of the transaction). In the latter case, the job | ||
| 880 | that is not required will be removed, or in case both are | ||
| 881 | not required, the unit that conflicts will be started and the | ||
| 882 | unit that is conflicted is stopped.', | ||
| 883 | 'DefaultDependencies' => 'Takes a boolean argument. If | ||
| 884 | C<yes>, (the default), a few default | ||
| 885 | dependencies will implicitly be created for the unit. The | ||
| 886 | actual dependencies created depend on the unit type. For | ||
| 887 | example, for service units, these dependencies ensure that the | ||
| 888 | service is started only after basic system initialization is | ||
| 889 | completed and is properly terminated on system shutdown. See | ||
| 890 | the respective man pages for details. Generally, only services | ||
| 891 | involved with early boot or late shutdown should set this | ||
| 892 | option to C<no>. It is highly recommended to | ||
| 893 | leave this option enabled for the majority of common units. If | ||
| 894 | set to C<no>, this option does not disable | ||
| 895 | all implicit dependencies, just non-essential | ||
| 896 | ones.', | ||
| 897 | 'Description' => 'A brief, meaningful, human-readable text identifying the unit. This may be used by | ||
| 898 | systemd (and suitable UIs) as a user-visible label for the unit, so this string | ||
| 899 | should identify the unit rather than just describe it, despite the name. This string also should not | ||
| 900 | just repeat the unit name. C<Apache HTTP Server> or C<Postfix Mail | ||
| 901 | Server> are good examples. Bad examples are C<high-performance lightweight HTTP | ||
| 902 | server> (too generic) or C<Apache> (meaningless for people who do not know | ||
| 903 | the Apache HTTP server project, duplicates the unit name). systemd may use this | ||
| 904 | string as a noun in status messages (C<Starting | ||
| 905 | Description...>, C<Started | ||
| 906 | Description.>, C<Reached target | ||
| 907 | Description.>, C<Failed to start | ||
| 908 | Description.>), so it should be capitalized, and should not be a | ||
| 909 | full sentence, or a phrase with a verb conjugated in the present continuous, or end in a full | ||
| 910 | stop. Bad examples include C<exiting the container>, C<updating the database | ||
| 911 | once per day.>, or C<OpenSSH server second instance daemon>.', | ||
| 912 | 'Documentation' => 'A space-separated list of URIs referencing | ||
| 913 | documentation for this unit or its configuration. Accepted are | ||
| 914 | only URIs of the types C<http://>, | ||
| 915 | C<https://>, C<file:>, | ||
| 916 | C<info:>, C<man:>. For more | ||
| 917 | information about the syntax of these URIs, see L<uri(7)>. | ||
| 918 | The URIs should be listed in order of relevance, starting with | ||
| 919 | the most relevant. It is a good idea to first reference | ||
| 920 | documentation that explains what the unit\'s purpose is, | ||
| 921 | followed by how it is configured, followed by any other | ||
| 922 | related documentation. This option may be specified more than | ||
| 923 | once, in which case the specified list of URIs is merged. If | ||
| 924 | the empty string is assigned to this option, the list is reset | ||
| 925 | and all prior assignments will have no | ||
| 926 | effect.', | ||
| 927 | 'FailureActionExitStatus' => "Controls the exit status to propagate back to an invoking container manager (in case of a | ||
| 928 | system service) or service manager (in case of a user manager) when the | ||
| 929 | C<FailureAction>/C<SuccessAction> are set to C<exit> or | ||
| 930 | C<exit-force> and the action is triggered. By default, the exit status of the main process of the | ||
| 931 | triggering unit (if this applies) is propagated. Takes a value in the range 0\x{2026}255 or the empty string to | ||
| 932 | request default behaviour.", | ||
| 933 | 'IgnoreOnIsolate' => 'Takes a boolean argument. If C<true>, this unit will not be stopped | ||
| 934 | when isolating another unit. Defaults to C<false> for service, target, socket, timer, | ||
| 935 | and path units, and C<true> for slice, scope, device, swap, mount, and automount | ||
| 936 | units.', | ||
| 937 | 'JobRunningTimeoutSec' => 'C<JobTimeoutSec> specifies a timeout for the whole job that starts | ||
| 938 | running when the job is queued. C<JobRunningTimeoutSec> specifies a timeout that | ||
| 939 | starts running when the queued job is actually started. If either limit is reached, the job will be | ||
| 940 | cancelled, the unit however will not change state or even enter the C<failed> mode. | ||
| 941 | |||
| 942 | Both settings take a time span with the default unit of seconds, but other units may be | ||
| 943 | specified, see | ||
| 944 | L<systemd.time(7)>. | ||
| 945 | The default is C<infinity> (job timeouts disabled), except for device units where | ||
| 946 | C<JobRunningTimeoutSec> defaults to C<DefaultDeviceTimeoutSec>. | ||
| 947 | |||
| 948 | Note: these timeouts are independent from any unit-specific timeouts (for example, the timeout | ||
| 949 | set with C<TimeoutStartSec> in service units). The job timeout has no effect on the | ||
| 950 | unit itself. Or in other words: unit-specific timeouts are useful to abort unit state changes, and | ||
| 951 | revert them. The job timeout set with this option however is useful to abort only the job waiting for | ||
| 952 | the unit state to change.', | ||
| 953 | 'JobTimeoutAction' => 'C<JobTimeoutAction> optionally configures an additional action to | ||
| 954 | take when the timeout is hit, see description of C<JobTimeoutSec> and | ||
| 955 | C<JobRunningTimeoutSec> above. It takes the same values as | ||
| 956 | C<FailureAction>/C<SuccessAction>. Defaults to | ||
| 957 | C<none>. | ||
| 958 | |||
| 959 | C<JobTimeoutRebootArgument> configures an optional reboot string to pass to | ||
| 960 | the L<reboot(2)> system | ||
| 961 | call.', | ||
| 962 | 'JobTimeoutRebootArgument' => '*JobTimeoutAction', | ||
| 963 | 'JobTimeoutSec' => '*JobRunningTimeoutSec', | ||
| 964 | 'JoinsNamespaceOf' => 'For units that start processes (such as service units), lists one or more other units | ||
| 965 | whose network and/or temporary file namespace to join. If this is specified on a unit (say, | ||
| 966 | C<a.service> has C<JoinsNamespaceOf=b.service>), then the inverse | ||
| 967 | dependency (C<JoinsNamespaceOf=a.service> for b.service) is implied. This only | ||
| 968 | applies to unit types which support the C<PrivateNetwork>, | ||
| 969 | C<NetworkNamespacePath>, C<PrivateIPC>, | ||
| 970 | C<IPCNamespacePath>, and C<PrivateTmp> directives (see | ||
| 971 | L<systemd.exec(5)> for | ||
| 972 | details). If a unit that has this setting set is started, its processes will see the same | ||
| 973 | C</tmp/>, C</var/tmp/>, IPC namespace and network namespace as | ||
| 974 | one listed unit that is started. If multiple listed units are already started and these do not share | ||
| 975 | their namespace, then it is not defined which namespace is joined. Note that this setting only has an | ||
| 976 | effect if C<PrivateNetwork>/C<NetworkNamespacePath>, | ||
| 977 | C<PrivateIPC>/C<IPCNamespacePath> and/or | ||
| 978 | C<PrivateTmp> is enabled for both the unit that joins the namespace and the unit | ||
| 979 | whose namespace is joined.', | ||
| 980 | 'OnFailure' => 'A space-separated list of one or more units that are activated when this unit enters | ||
| 981 | the C<failed> state.', | ||
| 982 | 'OnFailureJobMode' => 'Takes a value of | ||
| 983 | C<fail>, | ||
| 984 | C<replace>, | ||
| 985 | C<replace-irreversibly>, | ||
| 986 | C<isolate>, | ||
| 987 | C<flush>, | ||
| 988 | C<ignore-dependencies> or | ||
| 989 | C<ignore-requirements>. | ||
| 990 | C<OnFailureJobMode> defaults to | ||
| 991 | C<replace>, | ||
| 992 | C<OnSuccessJobMode> defaults to | ||
| 993 | C<fail>. Specifies how the units listed in | ||
| 994 | C<OnSuccess>/C<OnFailure> will be enqueued. See | ||
| 995 | L<systemctl(1)>\'s | ||
| 996 | C<--job-mode=> option for details on the | ||
| 997 | possible values. If this is set to C<isolate>, | ||
| 998 | only a single unit may be listed in | ||
| 999 | C<OnSuccess>/C<OnFailure>.', | ||
| 1000 | 'OnSuccess' => 'A space-separated list of one or more units that are activated when this unit enters | ||
| 1001 | the C<inactive> state.', | ||
| 1002 | 'OnSuccessJobMode' => '*OnFailureJobMode', | ||
| 1003 | 'PartOf' => "Configures dependencies similar to | ||
| 1004 | C<Requires>, but limited to stopping and | ||
| 1005 | restarting of units. When systemd stops or restarts the units | ||
| 1006 | listed here, the action is propagated to this unit. Note that | ||
| 1007 | this is a one-way dependency\x{a0}\x{2014} changes to this unit do not | ||
| 1008 | affect the listed units. | ||
| 1009 | |||
| 1010 | When C<PartOf=b.service> is used on | ||
| 1011 | C<a.service>, this dependency will show as | ||
| 1012 | C<ConsistsOf=a.service> in property listing of | ||
| 1013 | C<b.service>. C<ConsistsOf> | ||
| 1014 | dependency cannot be specified directly.", | ||
| 1015 | 'PropagatesReloadTo' => 'A space-separated list of one or more units to which reload requests from this unit | ||
| 1016 | shall be propagated to, or units from which reload requests shall be propagated to this unit, | ||
| 1017 | respectively. Issuing a reload request on a unit will automatically also enqueue reload requests on | ||
| 1018 | all units that are linked to it using these two settings.', | ||
| 1019 | 'PropagatesStopTo' => 'A space-separated list of one or more units to which stop requests from this unit | ||
| 1020 | shall be propagated to, or units from which stop requests shall be propagated to this unit, | ||
| 1021 | respectively. Issuing a stop request on a unit will automatically also enqueue stop requests on all | ||
| 1022 | units that are linked to it using these two settings.', | ||
| 1023 | 'RefuseManualStart' => 'Takes a boolean argument. If | ||
| 1024 | C<true>, this unit can only be activated or | ||
| 1025 | deactivated indirectly. In this case, explicit start-up or | ||
| 1026 | termination requested by the user is denied, however if it is | ||
| 1027 | started or stopped as a dependency of another unit, start-up | ||
| 1028 | or termination will succeed. This is mostly a safety feature | ||
| 1029 | to ensure that the user does not accidentally activate units | ||
| 1030 | that are not intended to be activated explicitly, and not | ||
| 1031 | accidentally deactivate units that are not intended to be | ||
| 1032 | deactivated. These options default to | ||
| 1033 | C<false>.', | ||
| 1034 | 'RefuseManualStop' => '*RefuseManualStart', | ||
| 1035 | 'ReloadPropagatedFrom' => '*PropagatesReloadTo', | ||
| 1036 | 'Requires' => "Similar to C<Wants>, but declares a stronger requirement | ||
| 1037 | dependency. Dependencies of this type may also be configured by adding a symlink to a | ||
| 1038 | C<.requires/> directory accompanying the unit file. | ||
| 1039 | |||
| 1040 | If this unit gets activated, the units listed will be activated as well. If one of | ||
| 1041 | the other units fails to activate, and an ordering dependency C<After> on the | ||
| 1042 | failing unit is set, this unit will not be started. Besides, with or without specifying | ||
| 1043 | C<After>, this unit will be stopped (or restarted) if one of the other units is | ||
| 1044 | explicitly stopped (or restarted). | ||
| 1045 | |||
| 1046 | Often, it is a better choice to use C<Wants> instead of | ||
| 1047 | C<Requires> in order to achieve a system that is more robust when dealing with | ||
| 1048 | failing services. | ||
| 1049 | |||
| 1050 | Note that this dependency type does not imply that the other unit always has to be in active state when | ||
| 1051 | this unit is running. Specifically: failing condition checks (such as C<ConditionPathExists>, | ||
| 1052 | C<ConditionPathIsSymbolicLink>, \x{2026} \x{2014} see below) do not cause the start job of a unit with a | ||
| 1053 | C<Requires> dependency on it to fail. Also, some unit types may deactivate on their own (for | ||
| 1054 | example, a service process may decide to exit cleanly, or a device may be unplugged by the user), which is not | ||
| 1055 | propagated to units having a C<Requires> dependency. Use the C<BindsTo> | ||
| 1056 | dependency type together with C<After> to ensure that a unit may never be in active state | ||
| 1057 | without a specific other unit also in active state (see below).", | ||
| 1058 | 'RequiresMountsFor' => 'Takes a space-separated list of absolute | ||
| 1059 | paths. Automatically adds dependencies of type | ||
| 1060 | C<Requires> and C<After> for | ||
| 1061 | all mount units required to access the specified path. | ||
| 1062 | |||
| 1063 | Mount points marked with C<noauto> are not | ||
| 1064 | mounted automatically through C<local-fs.target>, | ||
| 1065 | but are still honored for the purposes of this option, i.e. they | ||
| 1066 | will be pulled in by this unit.', | ||
| 1067 | 'Requisite' => 'Similar to C<Requires>. However, if the units listed here | ||
| 1068 | are not started already, they will not be started and the starting of this unit will fail | ||
| 1069 | immediately. C<Requisite> does not imply an ordering dependency, even if | ||
| 1070 | both units are started in the same transaction. Hence this setting should usually be | ||
| 1071 | combined with C<After>, to ensure this unit is not started before the other | ||
| 1072 | unit. | ||
| 1073 | |||
| 1074 | When C<Requisite=b.service> is used on | ||
| 1075 | C<a.service>, this dependency will show as | ||
| 1076 | C<RequisiteOf=a.service> in property listing of | ||
| 1077 | C<b.service>. C<RequisiteOf> | ||
| 1078 | dependency cannot be specified directly.', | ||
| 1079 | 'SourcePath' => 'A path to a configuration file this unit has | ||
| 1080 | been generated from. This is primarily useful for | ||
| 1081 | implementation of generator tools that convert configuration | ||
| 1082 | from an external configuration file format into native unit | ||
| 1083 | files. This functionality should not be used in normal | ||
| 1084 | units.', | ||
| 1085 | 'StartLimitAction' => 'Configure an additional action to take if the rate limit configured with | ||
| 1086 | C<StartLimitIntervalSec> and C<StartLimitBurst> is hit. Takes the same | ||
| 1087 | values as the C<FailureAction>/C<SuccessAction> settings. If | ||
| 1088 | C<none> is set, hitting the rate limit will trigger no action except that | ||
| 1089 | the start will not be permitted. Defaults to C<none>.', | ||
| 1090 | 'StopPropagatedFrom' => '*PropagatesStopTo', | ||
| 1091 | 'StopWhenUnneeded' => 'Takes a boolean argument. If | ||
| 1092 | C<true>, this unit will be stopped when it is no | ||
| 1093 | longer used. Note that, in order to minimize the work to be | ||
| 1094 | executed, systemd will not stop units by default unless they | ||
| 1095 | are conflicting with other units, or the user explicitly | ||
| 1096 | requested their shut down. If this option is set, a unit will | ||
| 1097 | be automatically cleaned up if no other active unit requires | ||
| 1098 | it. Defaults to C<false>.', | ||
| 1099 | 'SuccessActionExitStatus' => '*FailureActionExitStatus', | ||
| 1100 | 'SurviveFinalKillSignal' => 'Takes a boolean argument. Defaults to C<no>. If C<yes>, | ||
| 1101 | processes belonging to this unit will not be sent the final C<SIGTERM> and | ||
| 1102 | C<SIGKILL> signals during the final phase of the system shutdown process. | ||
| 1103 | This functionality replaces the older mechanism that allowed a program to set | ||
| 1104 | C<argv[0][0] = \'@\'> as described at | ||
| 1105 | L<systemd and Storage Daemons for the Root File | ||
| 1106 | System|https://systemd.io/ROOT_STORAGE_DAEMONS>, which however continues to be supported.', | ||
| 1107 | 'Upholds' => 'Configures dependencies similar to C<Wants>, but as long as this unit | ||
| 1108 | is up, all units listed in C<Upholds> are started whenever found to be inactive or | ||
| 1109 | failed, and no job is queued for them. While a C<Wants> dependency on another unit | ||
| 1110 | has a one-time effect when this units started, a C<Upholds> dependency on it has a | ||
| 1111 | continuous effect, constantly restarting the unit if necessary. This is an alternative to the | ||
| 1112 | C<Restart> setting of service units, to ensure they are kept running whatever | ||
| 1113 | happens. The restart happens without delay, and usual per-unit rate-limit applies. | ||
| 1114 | |||
| 1115 | When C<Upholds=b.service> is used on C<a.service>, this | ||
| 1116 | dependency will show as C<UpheldBy=a.service> in the property listing of | ||
| 1117 | C<b.service>.', | ||
| 1118 | 'Wants' => 'Configures (weak) requirement dependencies on other units. This option may be | ||
| 1119 | specified more than once or multiple space-separated units may be specified in one option in which | ||
| 1120 | case dependencies for all listed names will be created. Dependencies of this type may also be | ||
| 1121 | configured outside of the unit configuration file by adding a symlink to a | ||
| 1122 | C<.wants/> directory accompanying the unit file. For details, see above. | ||
| 1123 | |||
| 1124 | Units listed in this option will be started if the configuring unit is. However, if the listed | ||
| 1125 | units fail to start or cannot be added to the transaction, this has no impact on the validity of the | ||
| 1126 | transaction as a whole, and this unit will still be started. This is the recommended way to hook | ||
| 1127 | the start-up of one unit to the start-up of another unit. | ||
| 1128 | |||
| 1129 | Note that requirement dependencies do not influence the order in which services are started or | ||
| 1130 | stopped. This has to be configured independently with the C<After> or | ||
| 1131 | C<Before> options. If unit C<foo.service> pulls in unit | ||
| 1132 | C<bar.service> as configured with C<Wants> and no ordering is | ||
| 1133 | configured with C<After> or C<Before>, then both units will be | ||
| 1134 | started simultaneously and without any delay between them if C<foo.service> is | ||
| 1135 | activated.', | ||
| 1136 | 'WantsMountsFor' => 'Same as C<RequiresMountsFor>, | ||
| 1137 | but adds dependencies of type C<Wants> instead | ||
| 1138 | of C<Requires>.' | ||
| 1139 | }, | ||
| 1140 | 'element' => [ | ||
| 1141 | 'Description', | ||
| 1142 | { | ||
| 1143 | 'type' => 'leaf', | ||
| 1144 | 'value_type' => 'uniline' | ||
| 1145 | }, | ||
| 1146 | 'Documentation', | ||
| 1147 | { | ||
| 1148 | 'cargo' => { | ||
| 1149 | 'type' => 'leaf', | ||
| 1150 | 'value_type' => 'uniline' | ||
| 1151 | }, | ||
| 1152 | 'type' => 'list' | ||
| 1153 | }, | ||
| 1154 | 'Wants', | ||
| 1155 | '*Documentation', | ||
| 1156 | 'Requires', | ||
| 1157 | '*Documentation', | ||
| 1158 | 'Requisite', | ||
| 1159 | '*Documentation', | ||
| 1160 | 'BindsTo', | ||
| 1161 | '*Documentation', | ||
| 1162 | 'PartOf', | ||
| 1163 | '*Documentation', | ||
| 1164 | 'Upholds', | ||
| 1165 | { | ||
| 1166 | 'type' => 'leaf', | ||
| 1167 | 'value_type' => 'uniline' | ||
| 1168 | }, | ||
| 1169 | 'Conflicts', | ||
| 1170 | { | ||
| 1171 | 'cargo' => { | ||
| 1172 | 'type' => 'leaf', | ||
| 1173 | 'value_type' => 'uniline' | ||
| 1174 | }, | ||
| 1175 | 'type' => 'list' | ||
| 1176 | }, | ||
| 1177 | 'Before', | ||
| 1178 | '*Conflicts', | ||
| 1179 | 'After', | ||
| 1180 | '*Conflicts', | ||
| 1181 | 'OnFailure', | ||
| 1182 | { | ||
| 1183 | 'type' => 'leaf', | ||
| 1184 | 'value_type' => 'uniline' | ||
| 1185 | }, | ||
| 1186 | 'OnSuccess', | ||
| 1187 | '*OnFailure', | ||
| 1188 | 'PropagatesReloadTo', | ||
| 1189 | '*OnFailure', | ||
| 1190 | 'ReloadPropagatedFrom', | ||
| 1191 | '*OnFailure', | ||
| 1192 | 'PropagatesStopTo', | ||
| 1193 | '*OnFailure', | ||
| 1194 | 'StopPropagatedFrom', | ||
| 1195 | '*OnFailure', | ||
| 1196 | 'JoinsNamespaceOf', | ||
| 1197 | '*OnFailure', | ||
| 1198 | 'RequiresMountsFor', | ||
| 1199 | '*OnFailure', | ||
| 1200 | 'WantsMountsFor', | ||
| 1201 | '*OnFailure', | ||
| 1202 | 'OnSuccessJobMode', | ||
| 1203 | '*OnFailure', | ||
| 1204 | 'OnFailureJobMode', | ||
| 1205 | { | ||
| 1206 | 'migrate_from' => { | ||
| 1207 | 'formula' => '$unit', | ||
| 1208 | 'variables' => { | ||
| 1209 | 'unit' => '- OnFailureIsolate' | ||
| 1210 | } | ||
| 1211 | }, | ||
| 1212 | 'type' => 'leaf', | ||
| 1213 | 'value_type' => 'uniline' | ||
| 1214 | }, | ||
| 1215 | 'IgnoreOnIsolate', | ||
| 1216 | { | ||
| 1217 | 'type' => 'leaf', | ||
| 1218 | 'value_type' => 'boolean', | ||
| 1219 | 'write_as' => [ | ||
| 1220 | 'no', | ||
| 1221 | 'yes' | ||
| 1222 | ] | ||
| 1223 | }, | ||
| 1224 | 'StopWhenUnneeded', | ||
| 1225 | { | ||
| 1226 | 'type' => 'leaf', | ||
| 1227 | 'upstream_default' => 'no', | ||
| 1228 | 'value_type' => 'boolean', | ||
| 1229 | 'write_as' => [ | ||
| 1230 | 'no', | ||
| 1231 | 'yes' | ||
| 1232 | ] | ||
| 1233 | }, | ||
| 1234 | 'RefuseManualStart', | ||
| 1235 | { | ||
| 1236 | 'type' => 'leaf', | ||
| 1237 | 'value_type' => 'boolean', | ||
| 1238 | 'write_as' => [ | ||
| 1239 | 'no', | ||
| 1240 | 'yes' | ||
| 1241 | ] | ||
| 1242 | }, | ||
| 1243 | 'RefuseManualStop', | ||
| 1244 | '*RefuseManualStart', | ||
| 1245 | 'AllowIsolate', | ||
| 1246 | '*RefuseManualStart', | ||
| 1247 | 'DefaultDependencies', | ||
| 1248 | '*RefuseManualStart', | ||
| 1249 | 'SurviveFinalKillSignal', | ||
| 1250 | { | ||
| 1251 | 'type' => 'leaf', | ||
| 1252 | 'upstream_default' => 'no', | ||
| 1253 | 'value_type' => 'boolean', | ||
| 1254 | 'write_as' => [ | ||
| 1255 | 'no', | ||
| 1256 | 'yes' | ||
| 1257 | ] | ||
| 1258 | }, | ||
| 1259 | 'CollectMode', | ||
| 1260 | { | ||
| 1261 | 'choice' => [ | ||
| 1262 | 'inactive', | ||
| 1263 | 'inactive-or-failed' | ||
| 1264 | ], | ||
| 1265 | 'type' => 'leaf', | ||
| 1266 | 'value_type' => 'enum' | ||
| 1267 | }, | ||
| 1268 | 'FailureActionExitStatus', | ||
| 1269 | { | ||
| 1270 | 'type' => 'leaf', | ||
| 1271 | 'value_type' => 'uniline' | ||
| 1272 | }, | ||
| 1273 | 'SuccessActionExitStatus', | ||
| 1274 | '*FailureActionExitStatus', | ||
| 1275 | 'JobTimeoutSec', | ||
| 1276 | '*FailureActionExitStatus', | ||
| 1277 | 'JobRunningTimeoutSec', | ||
| 1278 | '*FailureActionExitStatus', | ||
| 1279 | 'JobTimeoutAction', | ||
| 1280 | '*FailureActionExitStatus', | ||
| 1281 | 'JobTimeoutRebootArgument', | ||
| 1282 | '*FailureActionExitStatus', | ||
| 1283 | 'StartLimitAction', | ||
| 1284 | { | ||
| 1285 | 'choice' => [ | ||
| 1286 | 'exit', | ||
| 1287 | 'exit-force', | ||
| 1288 | 'halt', | ||
| 1289 | 'halt-force', | ||
| 1290 | 'halt-immediate', | ||
| 1291 | 'kexec', | ||
| 1292 | 'kexec-force', | ||
| 1293 | 'none', | ||
| 1294 | 'poweroff', | ||
| 1295 | 'poweroff-force', | ||
| 1296 | 'poweroff-immediate', | ||
| 1297 | 'reboot', | ||
| 1298 | 'reboot-force', | ||
| 1299 | 'reboot-immediate', | ||
| 1300 | 'soft-reboot', | ||
| 1301 | 'soft-reboot-force' | ||
| 1302 | ], | ||
| 1303 | 'type' => 'leaf', | ||
| 1304 | 'value_type' => 'enum' | ||
| 1305 | }, | ||
| 1306 | 'SourcePath', | ||
| 1307 | { | ||
| 1308 | 'type' => 'leaf', | ||
| 1309 | 'value_type' => 'uniline' | ||
| 1310 | }, | ||
| 1311 | 'ConditionArchitecture', | ||
| 1312 | { | ||
| 1313 | 'cargo' => { | ||
| 1314 | 'choice' => [ | ||
| 1315 | 'alpha', | ||
| 1316 | 'arc', | ||
| 1317 | 'arc-be', | ||
| 1318 | 'arm', | ||
| 1319 | 'arm-be', | ||
| 1320 | 'arm64', | ||
| 1321 | 'arm64-be', | ||
| 1322 | 'cris', | ||
| 1323 | 'ia64', | ||
| 1324 | 'm68k', | ||
| 1325 | 'mips', | ||
| 1326 | 'mips-le', | ||
| 1327 | 'mips64', | ||
| 1328 | 'mips64-le', | ||
| 1329 | 'native', | ||
| 1330 | 'parisc', | ||
| 1331 | 'parisc64', | ||
| 1332 | 'ppc', | ||
| 1333 | 'ppc-le', | ||
| 1334 | 'ppc64', | ||
| 1335 | 'ppc64-le', | ||
| 1336 | 's390', | ||
| 1337 | 's390x', | ||
| 1338 | 'sh', | ||
| 1339 | 'sh64', | ||
| 1340 | 'sparc', | ||
| 1341 | 'sparc64', | ||
| 1342 | 'tilegx', | ||
| 1343 | 'x86', | ||
| 1344 | 'x86-64' | ||
| 1345 | ], | ||
| 1346 | 'type' => 'leaf', | ||
| 1347 | 'value_type' => 'enum' | ||
| 1348 | }, | ||
| 1349 | 'type' => 'list' | ||
| 1350 | }, | ||
| 1351 | 'ConditionFirmware', | ||
| 1352 | { | ||
| 1353 | 'cargo' => { | ||
| 1354 | 'type' => 'leaf', | ||
| 1355 | 'value_type' => 'uniline' | ||
| 1356 | }, | ||
| 1357 | 'type' => 'list' | ||
| 1358 | }, | ||
| 1359 | 'ConditionVirtualization', | ||
| 1360 | '*ConditionFirmware', | ||
| 1361 | 'ConditionHost', | ||
| 1362 | '*ConditionFirmware', | ||
| 1363 | 'ConditionFraction', | ||
| 1364 | '*ConditionFirmware', | ||
| 1365 | 'ConditionKernelCommandLine', | ||
| 1366 | '*ConditionFirmware', | ||
| 1367 | 'ConditionKernelVersion', | ||
| 1368 | '*ConditionFirmware', | ||
| 1369 | 'ConditionVersion', | ||
| 1370 | '*ConditionFirmware', | ||
| 1371 | 'ConditionCredential', | ||
| 1372 | '*ConditionFirmware', | ||
| 1373 | 'ConditionEnvironment', | ||
| 1374 | '*ConditionFirmware', | ||
| 1375 | 'ConditionSecurity', | ||
| 1376 | '*ConditionFirmware', | ||
| 1377 | 'ConditionCapability', | ||
| 1378 | '*ConditionFirmware', | ||
| 1379 | 'ConditionACPower', | ||
| 1380 | '*ConditionFirmware', | ||
| 1381 | 'ConditionNeedsUpdate', | ||
| 1382 | { | ||
| 1383 | 'cargo' => { | ||
| 1384 | 'choice' => [ | ||
| 1385 | '!/etc/', | ||
| 1386 | '!/var/', | ||
| 1387 | '/etc/', | ||
| 1388 | '/var/' | ||
| 1389 | ], | ||
| 1390 | 'type' => 'leaf', | ||
| 1391 | 'value_type' => 'enum' | ||
| 1392 | }, | ||
| 1393 | 'type' => 'list' | ||
| 1394 | }, | ||
| 1395 | 'ConditionFirstBoot', | ||
| 1396 | { | ||
| 1397 | 'cargo' => { | ||
| 1398 | 'type' => 'leaf', | ||
| 1399 | 'value_type' => 'boolean', | ||
| 1400 | 'write_as' => [ | ||
| 1401 | 'no', | ||
| 1402 | 'yes' | ||
| 1403 | ] | ||
| 1404 | }, | ||
| 1405 | 'type' => 'list' | ||
| 1406 | }, | ||
| 1407 | 'ConditionPathExists', | ||
| 1408 | { | ||
| 1409 | 'cargo' => { | ||
| 1410 | 'type' => 'leaf', | ||
| 1411 | 'value_type' => 'uniline' | ||
| 1412 | }, | ||
| 1413 | 'type' => 'list' | ||
| 1414 | }, | ||
| 1415 | 'ConditionPathExistsGlob', | ||
| 1416 | '*ConditionPathExists', | ||
| 1417 | 'ConditionPathIsDirectory', | ||
| 1418 | '*ConditionPathExists', | ||
| 1419 | 'ConditionPathIsSymbolicLink', | ||
| 1420 | '*ConditionPathExists', | ||
| 1421 | 'ConditionPathIsMountPoint', | ||
| 1422 | '*ConditionPathExists', | ||
| 1423 | 'ConditionPathIsReadWrite', | ||
| 1424 | '*ConditionPathExists', | ||
| 1425 | 'ConditionPathIsEncrypted', | ||
| 1426 | '*ConditionPathExists', | ||
| 1427 | 'ConditionPathIsSocket', | ||
| 1428 | '*ConditionPathExists', | ||
| 1429 | 'ConditionDirectoryNotEmpty', | ||
| 1430 | '*ConditionPathExists', | ||
| 1431 | 'ConditionFileNotEmpty', | ||
| 1432 | '*ConditionPathExists', | ||
| 1433 | 'ConditionFileIsExecutable', | ||
| 1434 | '*ConditionPathExists', | ||
| 1435 | 'ConditionUser', | ||
| 1436 | '*ConditionPathExists', | ||
| 1437 | 'ConditionGroup', | ||
| 1438 | '*ConditionPathExists', | ||
| 1439 | 'ConditionControlGroupController', | ||
| 1440 | '*ConditionPathExists', | ||
| 1441 | 'ConditionMemory', | ||
| 1442 | '*ConditionPathExists', | ||
| 1443 | 'ConditionCPUs', | ||
| 1444 | '*ConditionPathExists', | ||
| 1445 | 'ConditionCPUFeature', | ||
| 1446 | '*ConditionPathExists', | ||
| 1447 | 'ConditionOSRelease', | ||
| 1448 | '*ConditionPathExists', | ||
| 1449 | 'ConditionMachineTag', | ||
| 1450 | '*ConditionPathExists', | ||
| 1451 | 'ConditionMemoryPressure', | ||
| 1452 | '*ConditionPathExists', | ||
| 1453 | 'ConditionCPUPressure', | ||
| 1454 | '*ConditionPathExists', | ||
| 1455 | 'ConditionIOPressure', | ||
| 1456 | '*ConditionPathExists', | ||
| 1457 | 'ConditionKernelModuleLoaded', | ||
| 1458 | '*ConditionPathExists', | ||
| 1459 | 'AssertArchitecture', | ||
| 1460 | { | ||
| 1461 | 'type' => 'leaf', | ||
| 1462 | 'value_type' => 'uniline' | ||
| 1463 | }, | ||
| 1464 | 'AssertVirtualization', | ||
| 1465 | '*AssertArchitecture', | ||
| 1466 | 'AssertHost', | ||
| 1467 | '*AssertArchitecture', | ||
| 1468 | 'AssertFraction', | ||
| 1469 | '*AssertArchitecture', | ||
| 1470 | 'AssertKernelCommandLine', | ||
| 1471 | '*AssertArchitecture', | ||
| 1472 | 'AssertKernelVersion', | ||
| 1473 | '*AssertArchitecture', | ||
| 1474 | 'AssertVersion', | ||
| 1475 | '*AssertArchitecture', | ||
| 1476 | 'AssertCredential', | ||
| 1477 | '*AssertArchitecture', | ||
| 1478 | 'AssertEnvironment', | ||
| 1479 | '*AssertArchitecture', | ||
| 1480 | 'AssertSecurity', | ||
| 1481 | '*AssertArchitecture', | ||
| 1482 | 'AssertCapability', | ||
| 1483 | '*AssertArchitecture', | ||
| 1484 | 'AssertACPower', | ||
| 1485 | '*AssertArchitecture', | ||
| 1486 | 'AssertNeedsUpdate', | ||
| 1487 | '*AssertArchitecture', | ||
| 1488 | 'AssertFirstBoot', | ||
| 1489 | '*AssertArchitecture', | ||
| 1490 | 'AssertPathExists', | ||
| 1491 | '*AssertArchitecture', | ||
| 1492 | 'AssertPathExistsGlob', | ||
| 1493 | '*AssertArchitecture', | ||
| 1494 | 'AssertPathIsDirectory', | ||
| 1495 | '*AssertArchitecture', | ||
| 1496 | 'AssertPathIsSymbolicLink', | ||
| 1497 | '*AssertArchitecture', | ||
| 1498 | 'AssertPathIsMountPoint', | ||
| 1499 | '*AssertArchitecture', | ||
| 1500 | 'AssertPathIsReadWrite', | ||
| 1501 | '*AssertArchitecture', | ||
| 1502 | 'AssertPathIsEncrypted', | ||
| 1503 | '*AssertArchitecture', | ||
| 1504 | 'AssertPathIsSocket', | ||
| 1505 | '*AssertArchitecture', | ||
| 1506 | 'AssertDirectoryNotEmpty', | ||
| 1507 | '*AssertArchitecture', | ||
| 1508 | 'AssertFileNotEmpty', | ||
| 1509 | '*AssertArchitecture', | ||
| 1510 | 'AssertFileIsExecutable', | ||
| 1511 | '*AssertArchitecture', | ||
| 1512 | 'AssertUser', | ||
| 1513 | '*AssertArchitecture', | ||
| 1514 | 'AssertGroup', | ||
| 1515 | '*AssertArchitecture', | ||
| 1516 | 'AssertControlGroupController', | ||
| 1517 | '*AssertArchitecture', | ||
| 1518 | 'AssertMemory', | ||
| 1519 | '*AssertArchitecture', | ||
| 1520 | 'AssertCPUs', | ||
| 1521 | '*AssertArchitecture', | ||
| 1522 | 'AssertCPUFeature', | ||
| 1523 | '*AssertArchitecture', | ||
| 1524 | 'AssertOSRelease', | ||
| 1525 | '*AssertArchitecture', | ||
| 1526 | 'AssertMachineTag', | ||
| 1527 | '*AssertArchitecture', | ||
| 1528 | 'AssertMemoryPressure', | ||
| 1529 | '*AssertArchitecture', | ||
| 1530 | 'AssertCPUPressure', | ||
| 1531 | '*AssertArchitecture', | ||
| 1532 | 'AssertIOPressure', | ||
| 1533 | '*AssertArchitecture', | ||
| 1534 | 'AssertKernelModuleLoaded', | ||
| 1535 | '*AssertArchitecture', | ||
| 1536 | 'StartLimitInterval', | ||
| 1537 | { | ||
| 1538 | 'type' => 'leaf', | ||
| 1539 | 'value_type' => 'uniline', | ||
| 1540 | 'warn' => 'StartLimitInterval is now StartLimitIntervalSec.' | ||
| 1541 | }, | ||
| 1542 | 'OnFailureIsolate', | ||
| 1543 | { | ||
| 1544 | 'type' => 'leaf', | ||
| 1545 | 'value_type' => 'uniline', | ||
| 1546 | 'warn' => 'OnFailureIsolate is now OnFailureJobMode.' | ||
| 1547 | } | ||
| 1548 | ], | ||
| 1549 | 'generated_by' => 'parse-man.pl from systemd 261 doc', | ||
| 1550 | 'license' => 'LGPLv2.1+', | ||
| 1551 | 'name' => 'Systemd::Section::Unit', | ||
| 1552 | 'status' => { | ||
| 1553 | 'deprecated' => [ | ||
| 1554 | 'OnFailureIsolate', | ||
| 1555 | 'StartLimitInterval' | ||
| 1556 | ] | ||
| 1557 | } | ||
| 1558 | } | ||
| 1559 | ] | ||
| 1560 | ; | ||