8d419f
From 70ff2f68c1cf9bdfe79ab4719ee0a051bbcb22eb Mon Sep 17 00:00:00 2001
8d419f
From: Frantisek Sumsal <frantisek@sumsal.cz>
8d419f
Date: Sun, 17 Apr 2022 19:49:17 +0200
8d419f
Subject: [PATCH] test: resize the terminal automagically with
8d419f
 INTERACTIVE_DEBUG=yes
8d419f
8d419f
(cherry picked from commit 17082e8ac1b5335465876d100774893ba735fca4)
8d419f
8d419f
Related: #2087652
8d419f
---
8d419f
 test/test-functions | 12 +++++-------
8d419f
 1 file changed, 5 insertions(+), 7 deletions(-)
8d419f
8d419f
diff --git a/test/test-functions b/test/test-functions
8d419f
index 9e171cba30..42ad16050c 100644
8d419f
--- a/test/test-functions
8d419f
+++ b/test/test-functions
8d419f
@@ -1678,14 +1678,12 @@ install_debug_tools() {
8d419f
         local getty_override="${initdir:?}/etc/systemd/system/serial-getty@.service.d"
8d419f
         mkdir -p "$getty_override"
8d419f
         echo -e "[Service]\nEnvironment=TERM=linux" >"$getty_override/default-TERM.conf"
8d419f
+        echo 'export TERM=linux' >>"$initdir/etc/profile"
8d419f
 
8d419f
-        cat >"$initdir/etc/motd" <
8d419f
-To adjust the terminal size use:
8d419f
-    export COLUMNS=xx
8d419f
-    export LINES=yy
8d419f
-or
8d419f
-    stty cols xx rows yy
8d419f
-EOF
8d419f
+        if command -v resize >/dev/null; then
8d419f
+            image_install resize
8d419f
+            echo "resize" >>"$initdir/etc/profile"
8d419f
+        fi
8d419f
     fi
8d419f
 }
8d419f