man/systemd.exec: document behavior of SetLoginEnvironment= when unset

Follow-up for 854eca4a95

Addresses https://github.com/systemd/systemd/pull/29493#discussion_r1351980046
This commit is contained in:
Mike Yuan 2023-10-10 18:08:08 +08:00 committed by Luca Boccassi
parent b5ac77e9a5
commit 3759a17418

View File

@ -699,12 +699,12 @@
<varlistentry>
<term><varname>SetLoginEnvironment=</varname></term>
<listitem><para>Takes a boolean parameter. If true, <varname>$HOME</varname>, <varname>$LOGNAME</varname>,
and <varname>$SHELL</varname> environment variables will be set for system services even if
<varname>User=</varname> is not set, i.e. when the default user <literal>root</literal> is used.
If false, the mentioned variables are not set by systemd, no matter whether <varname>User=</varname>
is set or not. This option normally has no effect on user services, since these variables are typically
inherited from user manager's own environment anyway.</para>
<listitem><para>Takes a boolean parameter that controls whether to set <varname>$HOME</varname>,
<varname>$LOGNAME</varname>, and <varname>$SHELL</varname> environment variables. If unset, this is
controlled by whether <varname>User=</varname> is set. If true, they will always be set for system services,
i.e. even when the default user <literal>root</literal> is used. If false, the mentioned variables are not set
by systemd, no matter whether <varname>User=</varname> is used or not. This option normally has no effect
on user services, since these variables are typically inherited from user manager's own environment anyway.</para>
<xi:include href="version-info.xml" xpointer="v255"/></listitem>
</varlistentry>