X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=man%2Fsystemd.unit.xml;h=b222f9f064ef1deef85f71f5a8a93d8d1af75b25;hb=0e89268b285657bf1b52cebb12fe42b5ac630582;hp=0ca18bd317ae4f6fde00d3005b4d2be66f9d00a8;hpb=8092a428d40ac682df9e80c36988043854579679;p=elogind.git diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 0ca18bd31..b222f9f06 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -180,30 +180,86 @@ 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 + it is found. + + To refer to the instance string from within the configuration file you may use the special %i specifier in many of the - configuration options. Other specifiers that may be - used are %n, %N, - %p, %P, - %I, %f, - %c, %r, - %R and %t for - the full unit name, the unescaped unit name, the - prefix name, the unescaped prefix name, the unescaped - instance name, the unescaped filename, the control - group path of the unit, the root control group path of - systemd, and the parent directory of the root control - cgroup path of systemd and the runtime socket dir, - respectively. The unescaped filename is either the - unescaped instance name (if set) with / prepended (if - necessary), or the prefix name similarly prepended - with /. The prefix name here refers to the string - before the @, i.e. "getty" in the example above, where - "tty3" is the instance name. The runtime socket - directory is either /run (for the - system manager) or $XDG_RUNTIME_DIR - (for user managers). + configuration options. Other specifiers exist, the + full list is: + + + Specifiers available in unit files + + + + + + + Specifier + Meaning + Details + + + + + %n + Full unit name + + + + %N + Unescaped full unit name + + + + %p + Prefix name + This refers to the string before the @, i.e. "getty" in the example above, where "tty3" is the instance name. + + + %P + Unescaped prefix name + + + + %i + Instance name + This is the string between the @ character and the suffix. + + + %I + Unescaped instance name + + + + %f + Unescaped file name + This is either the unescaped instance name (if set) with / prepended (if necessary), or the prefix name similarly prepended with /. + + + %c + Control group path of the unit + + + + %r + Root control group path of systemd + + + + %R + Parent directory of the root control group path of systemd + + + + %t + Runtime socket dir + This is either /run (for the system manager) or $XDG_RUNTIME_DIR (for user managers). + + + +
If a unit file is empty (i.e. has the file size 0) or is symlinked to /dev/null @@ -485,8 +541,8 @@ argument. If this unit will not be included in snapshots. Defaults to - for device and - snapshot units, + for device and + snapshot units, for the others. @@ -610,6 +666,7 @@ ConditionPathExistsGlob= ConditionPathIsDirectory= ConditionDirectoryNotEmpty= + ConditionFileIsExecutable= ConditionKernelCommandLine= ConditionVirtualization= ConditionSecurity= @@ -642,7 +699,13 @@ is similar to ConditionPathExists= but verifies whether a certain path - exists and is a directory. + exists and is a + directory. ConditionFileIsExecutable= + is similar to + ConditionPathExists= + but verifies whether a certain path + exists, is a regular file and marked + executable. ConditionDirectoryNotEmpty= is similar to ConditionPathExists=