]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
units: bring agetty command lines back into sync
authorLennart Poettering <lennart@poettering.net>
Thu, 11 Jul 2024 14:18:49 +0000 (16:18 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 19 Jul 2024 09:44:04 +0000 (11:44 +0200)
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
units/container-getty@.service.in
units/getty@.service.in
units/serial-getty@.service.in

index d64112be5ef03a6dd7ef753f37dfc40e10443d11..2de31dd01aaaab82affa0dd8cb89bfb824484f07 100644 (file)
@@ -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
index 8847d735fbd2371f563ece5b5f03e76bb5b85004..7e277a49bc5354bcd25c94d6b2b1ace37a2c00a8 100644 (file)
@@ -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
index 80b8f3e9228d923a6656be13bb245463b9024918..ce8db9764e00546f869c392b56857ea7fbd61715 100644 (file)
@@ -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
index 6bf101eac9aefeb4605235adeff004c9b20deea3..5669b19aff1e8fcb28acff1b9b14eabbafa7cce8 100644 (file)
@@ -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