diff options
author | Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> | 2017-05-24 14:58:01 +0300 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-07-09 10:53:31 -0400 |
commit | db6aedab9292678918f15807a0d835be35511667 (patch) | |
tree | 8952df57dabd1de3a43d4ebce5654cd9369b4ef5 /units/getty@.service.m4 | |
parent | 4c4bc54697d8dc425a90c22cd725da5852e18022 (diff) | |
download | systemd-db6aedab9292678918f15807a0d835be35511667.tar.gz |
units: Tell login to preserve environment (#6023)
Make agetty started by *getty* units pass '-p' option to "login", so it
doesn't clear the environment and passes whatever was setup by systemd
to shells. This is needed especially for programs which are specified as
user shells, but won't read locale settings from anywhere but
environment.
[zj: cherry-pick just the second patch from the series, see discussion
on the pull request.]
Diffstat (limited to 'units/getty@.service.m4')
-rw-r--r-- | units/getty@.service.m4 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/units/getty@.service.m4 b/units/getty@.service.m4 index 5b82c13fc5..2a84061ed6 100644 --- a/units/getty@.service.m4 +++ b/units/getty@.service.m4 @@ -33,7 +33,10 @@ ConditionPathExists=/dev/tty0 [Service] # the VT is cleared by TTYVTDisallocate -ExecStart=-/sbin/agetty --noclear %I $TERM +# The '-o' option value tells agetty to replace 'login' arguments with an +# option to preserve environment (-p), followed by '--' for safety, and then +# the entered username. +ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear %I $TERM Type=idle Restart=always RestartSec=0 |