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
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
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
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
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