]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Remove no longer needed login-options override. Fixes agetty autologin.
authorPontus Lundkvist <p@article.se>
Thu, 2 Jan 2025 23:20:59 +0000 (00:20 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 8 Jan 2025 21:30:04 +0000 (22:30 +0100)
The need for -o was introduced in db6aeda to set the -p flag for login.
Setting -o overrides agettys built-in handling of arguments, so "-- \\u" was needed to mimic it.

This broke the autologin-feature, since the -f (noauth) flag is not passed to login [1].

But with 3d2157e, the -p flag is dropped, but the full change wasn't reverted,
leaving autologin still broken - But for no reason since agetty does the right thing.

Reference:
[1]: https://github.com/util-linux/util-linux/blob/4e14b57/term-utils/agetty.c#L529-L550

units/console-getty.service.in
units/container-getty@.service.in
units/getty@.service.in
units/serial-getty@.service.in

index 33e6368db15d31b6f6dc94f8e92ead7c7b06d6b2..2182109009745463441d183b76ff6314172e1a9e 100644 (file)
@@ -20,9 +20,7 @@ Before=getty.target
 ConditionPathExists=/dev/console
 
 [Service]
-# The '-o' option value tells agetty to replace 'login' arguments with '--' for
-# safety, and then the entered username.
-ExecStart=-/sbin/agetty -o '-- \\u' --noreset --noclear --keep-baud 115200,57600,38400,9600 - ${TERM}
+ExecStart=-/sbin/agetty --noreset --noclear --keep-baud 115200,57600,38400,9600 - ${TERM}
 Type=idle
 Restart=always
 UtmpIdentifier=cons
index 7573532d6ddbafbc4fdb96675f24d592e03794be..f24bb73fc1d76f6d740e253088fcfc6a785f2232 100644 (file)
@@ -25,9 +25,7 @@ Conflicts=rescue.service
 Before=rescue.service
 
 [Service]
-# The '-o' option value tells agetty to replace 'login' arguments with '--' for
-# safety, and then the entered username.
-ExecStart=-/sbin/agetty -o '-- \\u' --noreset --noclear - ${TERM}
+ExecStart=-/sbin/agetty --noreset --noclear - ${TERM}
 Type=idle
 Restart=always
 RestartSec=0
index f30bba406d5a11798e5b8263189d36d3986944dd..a43e01144fd4c8b31d6113548fc0354e6b6b1fe4 100644 (file)
@@ -34,9 +34,7 @@ Before=rescue.service
 ConditionPathExists=/dev/tty0
 
 [Service]
-# The '-o' option value tells agetty to replace 'login' arguments with '--' for
-# safety, and then the entered username.
-ExecStart=-/sbin/agetty -o '-- \\u' --noreset --noclear - ${TERM}
+ExecStart=-/sbin/agetty --noreset --noclear - ${TERM}
 Type=idle
 Restart=always
 RestartSec=0
index 20a5eb2754f58cc23ac28e69628a77ef47f7f34a..c0adaf7bdb80012dab0c6d336f5b9903da2e590f 100644 (file)
@@ -30,9 +30,7 @@ Conflicts=rescue.service
 Before=rescue.service
 
 [Service]
-# The '-o' option value tells agetty to replace 'login' arguments with '--' for
-# safety, and then the entered username.
-ExecStart=-/sbin/agetty -o '-- \\u' --noreset --noclear --keep-baud 115200,57600,38400,9600 - ${TERM}
+ExecStart=-/sbin/agetty --noreset --noclear --keep-baud 115200,57600,38400,9600 - ${TERM}
 Type=idle
 Restart=always
 UtmpIdentifier=%I