summaryrefslogtreecommitdiff
path: root/man/systemd.exec.xml
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-23 19:46:23 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-29 21:55:51 +0200
commit5f5d8eab1f2f5f5e088bc301533b3e4636de96c7 (patch)
treed5341f3e35dc5cef2105368633c145ee75553545 /man/systemd.exec.xml
parent0521e286fc34d1ab58edc1a3fab7b8285c4b36e5 (diff)
core: allow setting WorkingDirectory= to the special value ~
If set to ~ the working directory is set to the home directory of the user configured in User=. This change also exposes the existing switch for the working directory that allowed making missing working directories non-fatal. This also changes "machinectl shell" to make use of this to ensure that the invoked shell is by default in the user's home directory. Fixes #1268.
Diffstat (limited to 'man/systemd.exec.xml')
-rw-r--r--man/systemd.exec.xml23
1 files changed, 14 insertions, 9 deletions
diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml
index 7633948645..d3f56fee40 100644
--- a/man/systemd.exec.xml
+++ b/man/systemd.exec.xml
@@ -84,22 +84,27 @@
<varlistentry>
<term><varname>WorkingDirectory=</varname></term>
- <listitem><para>Takes an absolute directory path. Sets the
- working directory for executed processes. If not set, defaults
- to the root directory when systemd is running as a system
- instance and the respective user's home directory if run as
- user.</para></listitem>
+ <listitem><para>Takes an absolute directory path, or the
+ special value <literal>~</literal>. Sets the working directory
+ for executed processes. If set to <literal>~</literal> the
+ home directory of the user specified in
+ <varname>User=</varname> is used. If not set, defaults to the
+ root directory when systemd is running as a system instance
+ and the respective user's home directory if run as user. If
+ the setting is prefixed with the <literal>-</literal>
+ character, a missing working directory is not considered
+ fatal.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>RootDirectory=</varname></term>
<listitem><para>Takes an absolute directory path. Sets the
- root directory for executed processes, with the
- <citerefentry project='man-pages'><refentrytitle>chroot</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+ root directory for executed processes, with the <citerefentry
+ project='man-pages'><refentrytitle>chroot</refentrytitle><manvolnum>2</manvolnum></citerefentry>
system call. If this is used, it must be ensured that the
- process and all its auxiliary files are available in the
- <function>chroot()</function> jail.</para></listitem>
+ process binary and all its auxiliary files are available in
+ the <function>chroot()</function> jail.</para></listitem>
</varlistentry>
<varlistentry>