[oe-commits] [openembedded-core] 02/39: base-files: profile: Do not assume that the tty command exists
git at git.openembedded.org
git at git.openembedded.org
Fri Apr 7 16:46:42 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 9514fb17b777a2a1c7a89694c05d01279d128766
Author: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
AuthorDate: Mon Apr 3 14:48:26 2017 +0200
base-files: profile: Do not assume that the tty command exists
This avoids the following error when logging in to a host that does
not have the tty command:
-sh: tty: not found
Reported-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn at axis.com>
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/recipes-core/base-files/base-files/profile | 6 +++---
meta/recipes-core/base-files/base-files_3.0.14.bb | 4 ----
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/meta/recipes-core/base-files/base-files/profile b/meta/recipes-core/base-files/base-files/profile
index 22dfb4f..ceaf15f 100644
--- a/meta/recipes-core/base-files/base-files/profile
+++ b/meta/recipes-core/base-files/base-files/profile
@@ -22,12 +22,12 @@ if [ -d /etc/profile.d ]; then
unset i
fi
-if [ -x /usr/bin/resize ] && termpath="`tty`"; then
+if command -v resize >/dev/null && command -v tty >/dev/null; then
# Make sure we are on a serial console (i.e. the device used starts with
# /dev/tty[A-z]), otherwise we confuse e.g. the eclipse launcher which
# tries do use ssh
- case "$termpath" in
- /dev/tty[A-z]*) resize >/dev/null
+ case $(tty) in
+ /dev/tty[A-z]*) resize >/dev/null;;
esac
fi
diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index f56969c..ca7bf06 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -128,10 +128,6 @@ do_install () {
install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf
install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd
- if [ "/usr/bin" != "${bindir}" ]; then
- sed -i "s,/usr/bin/resize,${bindir}/resize," ${D}${sysconfdir}/profile
- fi
-
ln -sf /proc/mounts ${D}${sysconfdir}/mtab
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list