|
Zbigniew Jędrzejewski-Szmek |
126222 |
From 4f4e72a317126e9d41db675ddae27a0942cd23bf Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
Date: Thu, 9 Jan 2014 22:23:32 -0500
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
Subject: [PATCH] man: mention which variables will be expanded in ExecStart
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
Conflicts:
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
man/systemd.service.xml
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
man/systemd.exec.xml | 6 ++++--
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
man/systemd.service.xml | 35 +++++++++++++++++++++++------------
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
2 files changed, 27 insertions(+), 14 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
index e213ec4..c8414d4 100644
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
--- a/man/systemd.exec.xml
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+++ b/man/systemd.exec.xml
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
@@ -295,9 +295,11 @@
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
for the assignment.</para>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
<para>Example:
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
- <programlisting>Environment="VAR1=word1 word2" VAR2=word3 "VAR3=word 5 6"</programlisting>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ <programlisting>Environment="VAR1=word1 word2" VAR2=word3 "VAR3=$word 5 6"</programlisting>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
gives three variables <literal>VAR1</literal>,
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
- <literal>VAR2</literal>, <literal>VAR3</literal>.
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ <literal>VAR2</literal>, <literal>VAR3</literal>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ with the values <literal>word1 word2</literal>,
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ <literal>word3</literal>, <literal>$word 5 6</literal>.
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
</para>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
<para>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
index af3e0f2..4fb21ba 100644
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
--- a/man/systemd.service.xml
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+++ b/man/systemd.service.xml
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
@@ -392,16 +392,32 @@
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
replaced by the value of the
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
environment variable including all
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
whitespace it contains, resulting in a
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
- single argument. Use
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ single argument. Use
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
<literal>$FOO</literal> as a separate
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
word on the command line, in which
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
case it will be replaced by the value
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
- of the environment variable split up
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
- at whitespace, resulting in zero or
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
- more arguments. To pass literal dollar sign
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
- use <literal>$$</literal>. Note that the first
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
- argument (i.e. the program to execute)
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
- may not be a variable.</para>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ of the environment variable split at
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ whitespace, resulting in zero or more
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ arguments. To pass a literal dollar
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ sign, use <literal>$$</literal>.
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ Variables whose value is not known at
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ expansion time are treated as empty
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ strings. Note that the first argument
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ (i.e. the program to execute) may not
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ be a variable.</para>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ <para>Variables to be used in this
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ fashion may be defined through
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ <varname>Environment=</varname> and
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ <varname>EnvironmentFile=</varname>.
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ In addition, variables listed in
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ section "Environment variables in
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ spawned processes" in
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ which are considered "static
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ configuration" may used (this includes
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ e.g. <varname>$USER</varname>, but not
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
+ <varname>$TERM</varname>).</para>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
<para>Optionally, if the absolute file
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
name is prefixed with
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
@@ -429,11 +445,6 @@
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
<programlisting>ExecStart=/bin/sh -c 'dmesg | tac'
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
</programlisting>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
- <para>Only select environment variables that
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
- are set for executed commands. See
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
- <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
- </para>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
-
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
<para>Example:</para>
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
<programlisting>ExecStart=/bin/echo one ; /bin/echo "two two"
|
|
Zbigniew Jędrzejewski-Szmek |
126222 |
</programlisting>
|