public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Neil Bothwick <neil@digimed.co.uk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] man bash document doesn't match real life bash.
Date: Wed, 19 Sep 2007 14:23:08 +0100	[thread overview]
Message-ID: <20070919142308.259ef440@zaphod.digimed.co.uk> (raw)
In-Reply-To: <46F13A34.4080201@ergolight-sw.com>

[-- Attachment #1: Type: text/plain, Size: 1381 bytes --]

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

> I was surprised to find that in man bash the reference to initialization
> files is wrong. The bash manual says it reads initialization files from
> /etc/profile:
> FILES
>        /bin/bash
>               The bash executable
>        /etc/profile
>               The systemwide initialization file, executed for login
> shells
> 
> 
> 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


-- 
Neil Bothwick

"Come on! It's a whole new life out there!"
"Oh, no. Not another one!"

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2007-09-19 13:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-19 15:03 [gentoo-user] man bash document doesn't match real life bash David Harel
2007-09-19 13:23 ` Neil Bothwick [this message]
2007-09-19 13:43   ` Etaoin Shrdlu
2007-09-22 20:12   ` David Harel
2007-09-23  3:19     ` Mrugesh Karnik
2007-09-23  8:35       ` Etaoin Shrdlu
2007-09-19 13:36 ` Albert Hopkins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070919142308.259ef440@zaphod.digimed.co.uk \
    --to=neil@digimed.co.uk \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox