From 56ea3c262cd08cf9c2264ee1009326ff9a25a975 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 11 Jul 2024 16:18:49 +0200 Subject: [PATCH] units: bring agetty command lines back into sync Let's always rely on our own TTY reset logic and tty disallocation/clear screen logic, thus always pass --noclear and --noreset. Also, bring the list of baud rates to try into sync for console-getty and serial-getty (the former might or might not be connected to rs232, we can't know, hence assume the worst, and copy what serial-getty@.service does) --- units/console-getty.service.in | 7 ++++--- units/container-getty@.service.in | 7 ++++--- units/getty@.service.in | 3 +-- units/serial-getty@.service.in | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/units/console-getty.service.in b/units/console-getty.service.in index d64112be5ef..2de31dd01aa 100644 --- a/units/console-getty.service.in +++ b/units/console-getty.service.in @@ -20,9 +20,10 @@ Before=getty.target ConditionPathExists=/dev/console [Service] -# 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 --keep-baud - 115200,38400,9600 $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' --noreset --noclear --keep-baud 115200,57600,38400,9600 - ${TERM} Type=idle Restart=always UtmpIdentifier=cons diff --git a/units/container-getty@.service.in b/units/container-getty@.service.in index 8847d735fbd..7e277a49bc5 100644 --- a/units/container-getty@.service.in +++ b/units/container-getty@.service.in @@ -25,9 +25,10 @@ Conflicts=rescue.service Before=rescue.service [Service] -# 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 - $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' --noreset --noclear - ${TERM} Type=idle Restart=always RestartSec=0 diff --git a/units/getty@.service.in b/units/getty@.service.in index 80b8f3e9228..ce8db9764e0 100644 --- a/units/getty@.service.in +++ b/units/getty@.service.in @@ -34,11 +34,10 @@ Before=rescue.service ConditionPathExists=/dev/tty0 [Service] -# the VT is cleared by TTYVTDisallocate # 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 - $TERM +ExecStart=-/sbin/agetty -o '-p -- \\u' --noreset --noclear - ${TERM} Type=idle Restart=always RestartSec=0 diff --git a/units/serial-getty@.service.in b/units/serial-getty@.service.in index 6bf101eac9a..5669b19aff1 100644 --- a/units/serial-getty@.service.in +++ b/units/serial-getty@.service.in @@ -33,7 +33,7 @@ Before=rescue.service # 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' --keep-baud 115200,57600,38400,9600 - $TERM +ExecStart=-/sbin/agetty -o '-p -- \\u' --noreset --noclear --keep-baud 115200,57600,38400,9600 - ${TERM} Type=idle Restart=always UtmpIdentifier=%I