On Wednesday 19 September 2007, Neil Bothwick wrote:

> On Wed, 19 Sep 2007 17:03:16 +0200, David Harel wrote:

> > Where real life uses /etc/bash/bashrc
> > This part is taken from strace dump: strace bash -i
> > open("/etc/bash/bashrc", O_RDONLY|O_LARGEFILE) = 3
>
> It reads both, this is from /etc/profile
>
> if [ -n "${BASH_VERSION}" ] ; then
>     # Newer bash ebuilds include /etc/bash/bashrc which will setup PS1
>     # including color.  We leave out color here because not all
>     # terminals support it.
>     if [ -f /etc/bash/bashrc ] ; then
>         # Bash login shells run only /etc/profile
>         # Bash non-login shells run only /etc/bash/bashrc
>         # Since we want to run /etc/bash/bashrc regardless, we source
> it # from here.  It is unfortunate that there is no way to do # this
> *after* the user's .bash_profile runs (without putting # it in the
> user's dot-files), but it shouldn't make any # difference.
>         . /etc/bash/bashrc

It reads both, but the "Bash non-login shells run only /etc/bash/bashrc" 
behavior is not documented in man bash.
-- 
[EMAIL PROTECTED] mailing list

Reply via email to