]> code.ossystems Code Review - openembedded-core.git/commitdiff
bash: explicitly define NON_INTERACTIVE_LOGIN_SHELLS in CFLAGS
authorChen Qi <Qi.Chen@windriver.com>
Tue, 21 Apr 2015 09:30:47 +0000 (17:30 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 24 Apr 2015 10:05:58 +0000 (11:05 +0100)
If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the
startup files, even if they are not interactive.

This is the behaviour of other major distros like Ubuntu and Fedora.
We also need to set it so that when executing `su -l xxx -c env' command,
/etc/profile is parsed.

[YOCTO #5359]
[YOCTO #7137]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/bash/bash.inc

index d7b28cfffed241a308f22e9ef231125885ac8ddc..c06f157b8a68d508d17af98258df6d2f8dfd4ad8 100644 (file)
@@ -9,6 +9,11 @@ inherit autotools gettext texinfo update-alternatives ptest
 EXTRA_AUTORECONF += "--exclude=autoheader"
 EXTRA_OECONF = "--enable-job-control"
 
+# If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the
+# startup files, even if they are not interactive.
+# This is what other major distros do. And this is what we wanted. See bug#5359 and bug#7137.
+CFLAGS += "-DNON_INTERACTIVE_LOGIN_SHELLS"
+
 ALTERNATIVE_${PN} = "sh"
 ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
 ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash"