Resize serial terminal on login (#860) (#863)

The new readline utilty used by the CLI add-on requires the size of the
terminal to be set. Use the resize command to initialize terminal size
on login if we are running on a serial terminal.
This commit is contained in:
Stefan Agner 2020-09-12 09:07:03 +02:00 committed by GitHub
parent ec1561661b
commit 31fc13cf03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,12 @@
# Run logging cli # Run logging cli
# ============================================================================== # ==============================================================================
# Setup terminal size on serial console
if [ "${TERM}" = "vt220" ] || [ "${TERM}" = "vt102" ] || \
[ "${TERM}" = "vt100" ]; then
resize
fi
# Run CLI container # Run CLI container
if [ "$(docker ps -q -f name=hassio_cli)" ]; then if [ "$(docker ps -q -f name=hassio_cli)" ]; then
docker container exec \ docker container exec \