diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2017-04-03 14:48:26 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-04-10 23:00:42 +0100 |
commit | 16b822509a4b7bce7bbf901337004caafe872f64 (patch) | |
tree | e705bc3b28c2083846bcac19be2ebd3c80d10812 /meta/recipes-core | |
parent | 227ec4809dbcdecd7a09392569f4464d9625d02a (diff) | |
download | poky-16b822509a4b7bce7bbf901337004caafe872f64.tar.gz |
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@axis.com>
(From OE-Core rev: e77cdb761169e404556487ac650dc562000da406)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/base-files/base-files/profile | 6 | ||||
-rw-r--r-- | 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 22dfb4f219..ceaf15f799 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 | |||
22 | unset i | 22 | unset i |
23 | fi | 23 | fi |
24 | 24 | ||
25 | if [ -x /usr/bin/resize ] && termpath="`tty`"; then | 25 | if command -v resize >/dev/null && command -v tty >/dev/null; then |
26 | # Make sure we are on a serial console (i.e. the device used starts with | 26 | # Make sure we are on a serial console (i.e. the device used starts with |
27 | # /dev/tty[A-z]), otherwise we confuse e.g. the eclipse launcher which | 27 | # /dev/tty[A-z]), otherwise we confuse e.g. the eclipse launcher which |
28 | # tries do use ssh | 28 | # tries do use ssh |
29 | case "$termpath" in | 29 | case $(tty) in |
30 | /dev/tty[A-z]*) resize >/dev/null | 30 | /dev/tty[A-z]*) resize >/dev/null;; |
31 | esac | 31 | esac |
32 | fi | 32 | fi |
33 | 33 | ||
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 f56969c52e..ca7bf06353 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 () { | |||
128 | install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf | 128 | install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf |
129 | install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd | 129 | install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd |
130 | 130 | ||
131 | if [ "/usr/bin" != "${bindir}" ]; then | ||
132 | sed -i "s,/usr/bin/resize,${bindir}/resize," ${D}${sysconfdir}/profile | ||
133 | fi | ||
134 | |||
135 | ln -sf /proc/mounts ${D}${sysconfdir}/mtab | 131 | ln -sf /proc/mounts ${D}${sysconfdir}/mtab |
136 | } | 132 | } |
137 | 133 | ||