]> code.ossystems Code Review - openembedded-core.git/commitdiff
base-files: set dynamic COLUMNS via resize command
authorTing Liu <ting.liu@freescale.com>
Thu, 31 Jul 2014 10:21:01 +0000 (18:21 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 6 Aug 2014 09:23:28 +0000 (10:23 +0100)
By default, COLUMNS is set to 80. If possible, run 'resize' to
determine what the current dimensions are. This avoids the final
part of long lines overlap the start of the same line.

Signed-off-by: Ting Liu <ting.liu@freescale.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/base-files/base-files/profile
meta/recipes-core/base-files/base-files_3.0.14.bb

index 0b2d9d79e51a4c6f304585a6086d80aee779e987..88ab8d877b0dac7ac174c75eea44031f9d24c1c9 100644 (file)
@@ -26,6 +26,10 @@ if [ -d /etc/profile.d ]; then
   unset i
 fi
 
+if [ -x /usr/bin/resize ];then
+  /usr/bin/resize >/dev/null
+fi
+
 export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM
 
 umask 022
index 30b1bf463b08709302ae8a0e8d4b34148420025e..07f5c54c97d86ef716b40c0662d466d897ca9611 100644 (file)
@@ -102,6 +102,10 @@ 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
 }