summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2016-12-20 14:28:46 +0100
committerStefan Agner <stefan.agner@toradex.com>2017-01-10 16:54:45 -0800
commit9a6f3e2e1abb658f33df1850eb2b609bd726aa37 (patch)
tree16410dc867a1e61d4c2876bd7241b875807f808e
parenteb4e2c5fc55a6167c5f6feea4af2e8e89e8ad633 (diff)
profile: redirect resize output to /dev/null
oe-core included resize in their profile too. Synchronize with the OE solution which already does the redirect. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Stefan Agner <stefan.agner@toradex.com>
-rw-r--r--recipes-core/base-files/base-files/profile11
1 files changed, 7 insertions, 4 deletions
diff --git a/recipes-core/base-files/base-files/profile b/recipes-core/base-files/base-files/profile
index 7b8b80d..6e2a6c7 100644
--- a/recipes-core/base-files/base-files/profile
+++ b/recipes-core/base-files/base-files/profile
@@ -32,10 +32,13 @@ export DISPLAY
export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM
# Serial consoles are not able to autoresize. Set size once upon login.
-# Make sure we are on a serial console (i.e. the device used starts with /dev/tty),
-# otherwise we confuse e.g. the eclipse launcher which tries do use ssh
-LOGINDEV=`tty | cut -c1-8`
-test "$LOGINDEV" = "/dev/tty" && resize
+if [ -x /usr/bin/resize ] && termpath="`tty`"; then
+ # Make sure we are on a serial console (i.e. the device used starts with /dev/tty),
+ # otherwise we confuse e.g. the eclipse launcher which tries do use ssh
+ case "$termpath" in
+ /dev/tty*) resize >/dev/null
+ esac
+fi
umask 022