1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-08 21:17:47 +03:00

units: Simplify container getty handling

Let's remove the baud settings for the container getty units since
they don't have any effect there anyway. On top of that, when we're
dealing with container TTYs, we can handle all the setup involved
ourselves so let's prevent agetty/login from touching the container
tty at all.

One example where this helps is that it actually makes disabling
TTYVHangup have an effect since before, login would unconditionally
call vhangup() on the tty.
This commit is contained in:
Daan De Meyer 2022-07-19 10:37:05 +02:00
parent 71ec216e86
commit 219fa78b5f
2 changed files with 5 additions and 7 deletions

View File

@ -20,9 +20,8 @@ Before=getty.target
ConditionPathExists=/dev/console ConditionPathExists=/dev/console
[Service] [Service]
# The '-o' option value tells agetty to replace 'login' arguments with an # The '-o' option value tells agetty to replace 'login' arguments with an option to preserve environment (-p),
# option to preserve environment (-p), followed by '--' for safety, and then # followed by '--' for safety, and then the entered username.
# the entered username.
ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear --keep-baud - 115200,38400,9600 $TERM ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear --keep-baud - 115200,38400,9600 $TERM
Type=idle Type=idle
Restart=always Restart=always

View File

@ -25,10 +25,9 @@ Conflicts=rescue.service
Before=rescue.service Before=rescue.service
[Service] [Service]
# The '-o' option value tells agetty to replace 'login' arguments with an # The '-o' option value tells agetty to replace 'login' arguments with an option to preserve environment (-p),
# option to preserve environment (-p), followed by '--' for safety, and then # followed by '--' for safety, and then the entered username.
# the entered username. ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear - $TERM
ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear --keep-baud - 115200,38400,9600 $TERM
Type=idle Type=idle
Restart=always Restart=always
RestartSec=0 RestartSec=0