|
From: | Yuri |
Subject: | Re: ~/.profile and ~/.bash_profile aren't executed on login |
Date: | Sun, 10 Dec 2017 19:22:36 -0800 |
User-agent: | Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |