From 0e89268b285657bf1b52cebb12fe42b5ac630582 Mon Sep 17 00:00:00 2001 From: Mathieu Bridon Date: Mon, 5 Sep 2011 16:35:57 +0800 Subject: [PATCH] man: list specifiers in a table It was noted on IRC that the current layout is not necessarily the easiest to parse by humans. I personnally struggled understanding it the first time I read it. Hopefully, this change makes it easier to understand. Note: I only reformatted the information that was already present in the documentation, I didn't add anything. --- man/systemd.unit.xml | 100 +++++++++++++++++++++++++++++++++---------- 1 file changed, 78 insertions(+), 22 deletions(-) diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index d38a00136..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 -- 2.30.2