[systemd-devel] [PATCH] man: Add a note about what environment variables are available by default.

Reindl Harald h.reindl at thelounge.net
Fri Jul 26 03:38:46 PDT 2013



Am 26.07.2013 12:03, schrieb Kay Sievers:
>>>  man/systemd.exec.xml | 7 +++++++
>>>  1 file changed, 7 insertions(+)
>>>
>>> diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml
>>> index c0e1d86..b78f255 100644
>>> --- a/man/systemd.exec.xml
>>> +++ b/man/systemd.exec.xml
>>> @@ -77,6 +77,13 @@
>>>                  configuration options are configured in the [Service],
>>>                  [Socket], [Mount], or [Swap] sections, depending on the unit
>>>                  type.</para>
>>> +
>>> +                <para>All processes are executed in a clean environment in
>>> +                which only the TERM, PATH, USER, and HOME variables are set
>>> +                by default.
>>
>> They are just preserved, passed-along, not exported or set by default, isn't it?
> 
> Seems for the system services, only PATH= and the locale are usually set:
> 
> $ sudo cat /proc/$(pidof systemd-logind)/environ
> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/binLANG=en_US.UTF-8LC_TIME=de_DE.UTF-8LC_PAPER=de_DE.UTF-8LC_MEASUREMENT=de_DE.UTF-8

on Fedora 18 (systemd-201-2.fc18.7.x86_64) and Fedora 17 (systemd-44-24.fc17.x86_64)
i see more like BOOT_IMAGE which also appears all in phpinfo()

 cat /proc/$(pidof systemd-logind)/environ
BOOT_IMAGE=/vmlinuz-3.9.11-200.fc18.x86_64divider=10biosdevname=0LANG=de_DE.UTF-8PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin

cat /proc/$(pidof systemd-logind)/environ
SYSFONT=latarcyrheb-sun16PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/binbiosdevname=0LANG=de_DE.UTF-8divider=20KEYTABLE=de-latin1-nodeadkeysBOOT_IMAGE=/vmlinuz-3.9.10-100.fc17.x86_64

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20130726/9eed1500/attachment-0001.pgp>


More information about the systemd-devel mailing list