]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: resize the terminal automagically with INTERACTIVE_DEBUG=yes
authorFrantisek Sumsal <frantisek@sumsal.cz>
Sun, 17 Apr 2022 17:49:17 +0000 (19:49 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 4 Jul 2022 07:41:06 +0000 (09:41 +0200)
test/test-functions

index fde174913c32adb84dde4e58921e19bcf4d178b7..d5572ecd6c97c41451843bf158e8c293bb01c49b 100644 (file)
@@ -1748,14 +1748,12 @@ install_debug_tools() {
         local getty_override="${initdir:?}/etc/systemd/system/serial-getty@.service.d"
         mkdir -p "$getty_override"
         echo -e "[Service]\nEnvironment=TERM=linux" >"$getty_override/default-TERM.conf"
+        echo 'export TERM=linux' >>"$initdir/etc/profile"
 
-        cat >"$initdir/etc/motd" <<EOF
-To adjust the terminal size use:
-    export COLUMNS=xx
-    export LINES=yy
-or
-    stty cols xx rows yy
-EOF
+        if command -v resize >/dev/null; then
+            image_install resize
+            echo "resize" >>"$initdir/etc/profile"
+        fi
     fi
 }