]> code.ossystems Code Review - openembedded-core.git/commitdiff
base-files: Add shell test quoting
authorJussi Kukkonen <jussi.kukkonen@intel.com>
Tue, 30 Aug 2016 08:32:07 +0000 (11:32 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 3 Sep 2016 22:45:43 +0000 (23:45 +0100)
tty can return "not a tt" which results in warnings when /etc/profile
is executed.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/base-files/base-files/profile

index ba1b9ba1564d1a2da15ec6f84cb043cd31a768c8..a52bf89cfdcd6514f5d1e14b118de108ebfa570f 100644 (file)
@@ -31,7 +31,7 @@ fi
 if [ -x /usr/bin/resize ];then
   # 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
+  test "`tty | cut -c1-8`" = "/dev/tty" && resize >/dev/null
 fi
 
 export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM