]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Set tty size and term for /dev/console as well 1543/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 8 May 2023 07:40:09 +0000 (09:40 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 8 May 2023 12:55:41 +0000 (14:55 +0200)
When emergency.service is started, it's started connected to
/dev/console, so make sure we configure default term and tty size
for that one as well.

mkosi/config.py

index 54362abd18d8a4acd19bafd1c1e9090eeba3c0c1..55220ec877b9374b3c23ed4955c416d36a58a645 100644 (file)
@@ -2113,6 +2113,9 @@ def load_kernel_command_line_extra(args: argparse.Namespace) -> list[str]:
     columns, lines = shutil.get_terminal_size()
 
     cmdline = [
+        f"systemd.tty.term.console={os.getenv('TERM', 'vt220')}",
+        f"systemd.tty.columns.console={columns}",
+        f"systemd.tty.rows.console={lines}",
         f"systemd.tty.term.ttyS0={os.getenv('TERM', 'vt220')}",
         f"systemd.tty.columns.ttyS0={columns}",
         f"systemd.tty.rows.ttyS0={lines}",