On 12/10/17 13:51, Chet Ramey wrote:
You have not described a bug, since you have not demonstrated that bash is
behaving other than how it is documented, nor have you provided answers to
any of the questions you've been asked. You haven't even determined whether
or not bash is being invoked as a login shell at some unspecified point in
the mystery login sequence you're using.


bash never calls ~/.profile when invoked as a login shell:


cp ~/.profile ~/.profile.bak
echo 'echo "==> executing ~/.profile"' > ~/.profile
ln -s /usr/local/bin/bash /usr/local/bin/sh
/usr/local/bin/sh --login
==> executing ~/.profile
/usr/local/bin/bash --login


It only calls ~/.profile when it is named 'sh'.


Same happens when this executable is set to be user's login shell.

You should stop depending on sh being linked to bash. It should never examine 
its name, and act as a login shell with any name.


Yuri


Reply via email to