On Thu, Sep 12, 2013 at 03:37:14PM +0200, Zbigniew Jędrzejewski-Szmek wrote:
On Thu, Sep 12, 2013 at 03:32:12PM +0200, Zbigniew Jędrzejewski-Szmek wrote:
On Fri, Jul 26, 2013 at 11:24:44AM +0100, Colin Guthrie wrote:
+paraAll processes are executed in a clean environment
in
+which only the TERM, PATH, USER, and HOME variables are
+inherited (from PID1) by default. In order to set
additional
+variables, see the Environment= and EnvironmentFile=
options
+below. To specify variables globally, you can configure
+DefaultEnvironment= in
+
citerefentryrefentrytitlesystemd-system.conf/refentrytitlemanvolnum5/manvolnum/citerefentry./para
Hi,
I pushed something like this now, but with completely different text,
since variables exported have changed significantly, and in addition
the behaviour for PID 1 and user instances is significantly different.
Hm, looking at the other part of this thread, Kay and Lennart have provided
a full list of variables. It is too long for one or two paragraphs, so
maybe a separate section describing all variables and circumstances in
which they are set should be added.
I compiled a list of the variables. It is kind of hard to provide
some meaningful text without being either very verbose or trivial,
and I feel the text still awkward. Comments, suggestions?
Zbyszek
---
man/systemd.exec.xml | 133 ++-
1 file changed, 111 insertions(+), 22 deletions(-)
diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml
index 5721dc1..2a950cf 100644
--- a/man/systemd.exec.xml
+++ b/man/systemd.exec.xml
@@ -57,7 +57,7 @@
titleDescription/title
paraUnit configuration files for services, sockets,
-mount points and swap devices share a subset of
+mount points, and swap devices share a subset of
configuration options which define the execution
environment of spawned processes./para
@@ -76,27 +76,6 @@
configuration options are configured in the [Service],
[Socket], [Mount], or [Swap] sections, depending on the unit
type./para
-
-paraProcesses started by the system systemd instance
-are executed in a clean environment in which only the
-varname$PATH/varname and varname$LANG/varname
-variables are set by default. In order to add
-additional variables, see the
-varnameEnvironment=/varname and
-varnameEnvironmentFile=/varname options below. To
-specify variables globally, see
-varnameDefaultEnvironment=/varname in
-
citerefentryrefentrytitlesystemd-system.conf/refentrytitlemanvolnum5/manvolnum/citerefentry
-or the kernel option
-varnamesystemd.setenv=/varname in
-
citerefentryrefentrytitlesystemd/refentrytitlemanvolnum1/manvolnum/citerefentry.
Processes
-started by the user systemd instances inherit all
-environment variables from the user systemd instance,
-and have varname$HOME/varname,
-varname$USER/varname,
-varname$XDG_RUNTIME_DIR/varname defined, among
-others. In addition, varname$MANAGERPID/varname
-contains the PID of the user systemd instance./para
/refsect1
refsect1
@@ -1006,6 +985,116 @@
/refsect1
refsect1
+titleEnvironment variables in spawned processes/title
+
+paraProcesses started by the system are executed in
+a clean environment in which select variables
+listed below are set. System processes started by systemd
+do not inherit variables from PID 1, but processes
+started by user systemd instances inherit all
+environment variables from the user systemd instance.
+/para
+
+variablelist class='environment-variables'
+varlistentry
+termvarname$PATH/varname/term
+
+listitemparaColon-separated list
+of directiories to use when launching
+executables. Set for all units.
+/para/listitem
+/varlistentry
+
+varlistentry
+termvarname$LANG/varname/term
+
+listitemparaLocale. Can be set in
+
citerefentryrefentrytitlelocale.conf/refentrytitlemanvolnum5/manvolnum/citerefentry
+or on the kernel