]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
units: Simplify container getty handling
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 19 Jul 2022 08:37:05 +0000 (10:37 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 28 Jul 2022 19:30:53 +0000 (21:30 +0200)
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.

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

index 73871d6f50a8115c5653e49aab7eeb1d877e0f6a..606b7dbe16b1c3d9d286db7b514ff49d5c56c851 100644 (file)
@@ -20,9 +20,8 @@ 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.
+# 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
 Type=idle
 Restart=always
index a6e3f94e2a5c21a39409f07f989201586ed0545e..8d7e20d5ecf9c646765654db0394726396f36a50 100644 (file)
@@ -25,10 +25,9 @@ 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 --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' --noclear - $TERM
 Type=idle
 Restart=always
 RestartSec=0