test: resize the terminal automagically with INTERACTIVE_DEBUG=yes

This commit is contained in:
Frantisek Sumsal 2022-04-17 19:49:17 +02:00
parent 8afe2f53b2
commit 17082e8ac1

View 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
}