]> code.ossystems Code Review - openembedded-core.git/commit
base-files/profile: Add universal resize function
authorJason Wessel <jason.wessel@windriver.com>
Mon, 2 Nov 2020 22:28:51 +0000 (14:28 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 8 Nov 2020 14:03:16 +0000 (14:03 +0000)
commit3743892996172c8595a1cbe884c4a0e6ef50dcda
tree5dab34c2342c057e8e4f3ac008de3319c10b8511
parentac5e0fd67d268dbf6fa80df101bc3f0d3f16d303
base-files/profile: Add universal resize function

Using an editor or any kind of command line that wraps beyond the
column width of the session on a serial port is quite problematic
unless you are using an 80x24 session.

The original /etc/profile tried to use the resize binary if it was
available.  The problem is that you only get the resize binary if
xterm, or busybox is installed.

This updated /etc/profile will add a resize function available to the
shell when no xterm or busybox resize binary is found.  More care is
taken in this new version to test that terminal is interactive.  The
EDITOR and SHLVL environment variables are checked to prevent resize
from running necessarily.

The function definitions are not indented intentionally to keep them
to the 80 column width.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/base-files/base-files/profile