summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJussi Kukkonen <jussi.kukkonen@intel.com>2016-08-30 11:32:07 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-08 23:47:14 +0000
commitf7e1cd9f85f8bd5f6ea92e747a80786a73b2aa0e (patch)
treed6d5b6f0d46a1b16ceeda3b6ee5c969b78574959 /meta
parentec240f45ae135e397c38310d616dfc436efcf2f2 (diff)
downloadpoky-f7e1cd9f85f8bd5f6ea92e747a80786a73b2aa0e.tar.gz
This is a backport from master of 2 consecutive fixes.
First fix commit: 1100af93cb07caf24d568c039d52fb0c80714c30 Second fix commit: b7b2e348716161deb21c9864ac5caa5f1df1fa9c The error these commits fix can prevent Eclipse debugging on certain target configurations. * base-files: Add shell test quoting tty can return "not a tt" which results in warnings when /etc/profile is executed. (From OE-Core rev: eed586dd238efe859442b21b425f04e262bcdb2b) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> * base-files: fix profile error under < /dev/null Previous attempts to constrain execution of `resize` to only TTYs did not properly handle situations when `tty` would return the string "not a tty". The symptom is "/etc/profile: line 34: test: too many arguments". Fix this by utilizing the exit code of `tty`. Also use `case` instead of `cut` to eliminate a subshell. (From OE-Core rev: e67637e4472ff3a1e2801b84ee3d69d4e14b9efc) Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (From OE-Core rev: e86ab7487450aea7e44ff70b225517dbb056e3b5) Signed-off-by: brian avery <brian.avery@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/base-files/base-files/profile6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/recipes-core/base-files/base-files/profile b/meta/recipes-core/base-files/base-files/profile
index ba1b9ba156..1f02e52ea9 100644
--- a/meta/recipes-core/base-files/base-files/profile
+++ b/meta/recipes-core/base-files/base-files/profile
@@ -28,10 +28,12 @@ if [ -d /etc/profile.d ]; then
28 unset i 28 unset i
29fi 29fi
30 30
31if [ -x /usr/bin/resize ];then 31if [ -x /usr/bin/resize ] && termpath="`tty`"; then
32 # Make sure we are on a serial console (i.e. the device used starts with /dev/tty), 32 # Make sure we are on a serial console (i.e. the device used starts with /dev/tty),
33 # otherwise we confuse e.g. the eclipse launcher which tries do use ssh 33 # otherwise we confuse e.g. the eclipse launcher which tries do use ssh
34 test `tty | cut -c1-8` = "/dev/tty" && resize >/dev/null 34 case "$termpath" in
35 /dev/tty*) resize >/dev/null
36 esac
35fi 37fi
36 38
37export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM 39export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM