Skip to content
Snippets Groups Projects
Commit 689d7e51 authored by Kari Oikarinen's avatar Kari Oikarinen
Browse files

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: default avatarMikko Gronoff <mikko.gronoff@qt.io>
Reviewed-by: default avatarSamuli Piippo <samuli.piippo@qt.io>
parent d8f60fdd
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment