]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man/systemd-service: clarify env variable expansion
authorLuca BRUNO <luca.bruno@coreos.com>
Thu, 16 Apr 2020 13:28:18 +0000 (13:28 +0000)
committerLennart Poettering <lennart@poettering.net>
Fri, 17 Apr 2020 13:55:40 +0000 (15:55 +0200)
This clarifies some more aspects of `${FOO}` expansions in service
units, mostly trying to answer my own doubts about what happens when
the matching variable is not defined.

man/systemd.service.xml

index 02eb7067899410c0af0d3e167655e62ba760365a..9f99feaef0802df4064f593f780736a8cbf1c44f 100644 (file)
 
     <para>Basic environment variable substitution is supported. Use
     <literal>${FOO}</literal> as part of a word, or as a word of its
-    own, on the command line, in which case it will be replaced by the
-    value of the environment variable including all whitespace it
-    contains, resulting in a single argument. Use
-    <literal>$FOO</literal> as a separate word on the command line, in
+    own, on the command line, in which case it will be erased and replaced
+    by the exact value of the environment variable (if any) including all
+    whitespace it contains, always resulting in exactly a single argument.
+    Use <literal>$FOO</literal> as a separate word on the command line, in
     which case it will be replaced by the value of the environment
     variable split at whitespace, resulting in zero or more arguments.
     For this type of expansion, quotes are respected when splitting