summaryrefslogtreecommitdiff
path: root/man/systemd.unit.xml
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2012-07-13 22:28:43 -0700
committerLennart Poettering <lennart@poettering.net>2012-07-16 12:25:25 +0200
commitb2896c905bef7be7ed9a760d9d61aa6ad0f614a3 (patch)
tree618cd1bb963e9a1904452a4db4d0063d2a5ff8e7 /man/systemd.unit.xml
parent7c5f152acafcf0964db2f3a111195b3b2f36176f (diff)
unit: printf specifiers %u and %h: $USER and $HOME.
These printf specifiers allow us to refer to $HOME and $USER in unit files. These are particularly helpful in instanced units that have "User=" set, and in systemd --user domains. The specifiers will return the pw_name and pw_dir fields if the unit file has a User= field. If the unit file does not have a User= field, the value substituted is either $USER or $HOME from the environment, or, if unset, the values from pw_name or pw_dir. This patch is somewhat after Ran Benita's original patch, which didn't get merged. I've split up the 2 specifiers and extended them to do what is logically expected from these specifiers. Note that expansion is done at `start` time, not after the units are parsed. Using `systemctl show` will just show the specifiers.
Diffstat (limited to 'man/systemd.unit.xml')
-rw-r--r--man/systemd.unit.xml10
1 files changed, 10 insertions, 0 deletions
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index 3fd76f3020..3236bfa741 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -258,6 +258,16 @@
<entry>Runtime socket dir</entry>
<entry>This is either /run (for the system manager) or $XDG_RUNTIME_DIR (for user managers).</entry>
</row>
+ <row>
+ <entry><literal>%u</literal></entry>
+ <entry>User name</entry>
+ <entry>This is the name of the configured user of the unit, or (if none is set) the user running the systemd instance.</entry>
+ </row>
+ <row>
+ <entry><literal>%h</literal></entry>
+ <entry>User home directory</entry>
+ <entry>This is the home directory of the configured user of the unit, or (if none is set) the user running the systemd instance.</entry>
+ </row>
</tbody>
</tgroup>
</table>