From 689d7e5140cd1e88d57c17cb6301afa5570ad8cb Mon Sep 17 00:00:00 2001 From: Kari Oikarinen Date: Thu, 19 Jan 2017 09:23:39 +0200 Subject: Fix error in /etc/profile when run from a non-tty The tty command can return "not a tty" and thus contain spaces. The test command invocation in /etc/profile did not take this into account. This led to an error message "/etc/profile: line 34: test: too many arguments" when running a process with Qt Creator RemoteLinux plugin. Change-Id: I892f8ed47a95f41977b7ef49f42c5c3a41cdf848 Reviewed-by: Mikko Gronoff Reviewed-by: Samuli Piippo --- recipes/base-files/base-files_3.0.14.bbappend | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/base-files/base-files_3.0.14.bbappend b/recipes/base-files/base-files_3.0.14.bbappend index 48ed6ee..1dc5501 100644 --- a/recipes/base-files/base-files_3.0.14.bbappend +++ b/recipes/base-files/base-files_3.0.14.bbappend @@ -38,4 +38,7 @@ do_install_append() { install -m 0755 -d ${D}${sysconfdir}/modprobe.d install -m 0644 ${WORKDIR}/blacklist.conf ${D}${sysconfdir}/modprobe.d + + # Add quotes around command expansion, since tty may return "not a tty" + sed -i 's#test `tty | cut -c1-8`#test "`tty | cut -c1-8`"#' ${D}${sysconfdir}/profile } -- cgit v1.2.3-54-g00ecf