public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: bavery <brian.avery@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 1/1] base-files: restrict resize to run on serial consoles only in profile │·
Date: Thu, 11 Aug 2016 15:29:48 -0700	[thread overview]
Message-ID: <bf71a7aefdce918bc76c185dcb90f570f2f63121.1470954349.git.brian.avery@intel.com> (raw)
In-Reply-To: <cover.1470954349.git.brian.avery@intel.com>

We don't need/wan't to run resize on an ssh connection. It's useless and
it breaks the Eclipse SSH debug connection. So, we added a check.

YOCTO #9362

Signed-off-by: bavery <brian.avery@intel.com>
---
 recipes-core/base-files/base-files/profile | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/recipes-core/base-files/base-files/profile b/recipes-core/base-files/base-files/profile
index e98e786..ba1b9ba 100644
--- a/recipes-core/base-files/base-files/profile
+++ b/recipes-core/base-files/base-files/profile
@@ -6,7 +6,7 @@ EDITOR="vi"			# needed for packages like cron, git-commit
 test -z "$TERM" && TERM="vt100"	# Basic terminal capab. For screen etc.
 
 if [ ! -e /etc/localtime -a ! -e /etc/TZ ]; then
-	TZ="UTC"		# Time Zone. Look at http://theory.uwinnipeg.ca/gnu/glibc/libc_303.html 
+	TZ="UTC"		# Time Zone. Look at http://theory.uwinnipeg.ca/gnu/glibc/libc_303.html
 				# for an explanation of how to set this to your local timezone.
 	export TZ
 fi
@@ -29,10 +29,11 @@ if [ -d /etc/profile.d ]; then
 fi
 
 if [ -x /usr/bin/resize ];then
-  /usr/bin/resize >/dev/null
+  # 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
+  test `tty | cut -c1-8` = "/dev/tty" && resize >/dev/null
 fi
 
 export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM
 
 umask 022
-
-- 
1.9.1



  reply	other threads:[~2016-08-11 22:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-11 22:29 [PATCH 0/1] [krogoth] Fix for Eclipse Qemu debug bavery
2016-08-11 22:29 ` bavery [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-08-09  0:20 [PATCH 0/1] Fix for Eclipse Qemu debugV2 bavery
2016-08-09  0:20 ` [PATCH 1/1] base-files: restrict resize to run on serial consoles only in profile │· bavery

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bf71a7aefdce918bc76c185dcb90f570f2f63121.1470954349.git.brian.avery@intel.com \
    --to=brian.avery@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox