aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--default.nix11
1 files changed, 5 insertions, 6 deletions
diff --git a/default.nix b/default.nix
index 1ff4b78..3f7c522 100644
--- a/default.nix
+++ b/default.nix
@@ -180,12 +180,11 @@ pkgs.writeShellScriptBin "run-firecracker-vm" /* sh */ ''
fi
# Tell systemd the terminal's type and size, so it doesn't query them via
- # ANSI sequences (and wait up to 333ms for each answer) when starting the
- # getty.
- tty_args=
- if test -n "''${TERM-}"; then
- tty_args="systemd.tty.term.ttyS0=$TERM"
- fi
+ # ANSI sequences (and wait up to 333ms for each answer): PID 1 asks for
+ # the type of /dev/console when starting (in the initrd and again after
+ # switching root), and both type and size of ttyS0 when starting the getty.
+ term=''${TERM:-dumb}
+ tty_args="systemd.tty.term.console=$term systemd.tty.term.ttyS0=$term"
if size=$(stty size 2>/dev/null) && test "$size" != "0 0"; then
read -r rows cols <<< "$size"
tty_args="$tty_args systemd.tty.rows.ttyS0=$rows systemd.tty.columns.ttyS0=$cols"