Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] man bash document doesn't match real life bash.
Date: Wed, 19 Sep 2007 13:37:36
Message-Id: 20070919142308.259ef440@zaphod.digimed.co.uk
In Reply to: [gentoo-user] man bash document doesn't match real life bash. by David Harel
1 On Wed, 19 Sep 2007 17:03:16 +0200, David Harel wrote:
2
3 > I was surprised to find that in man bash the reference to initialization
4 > files is wrong. The bash manual says it reads initialization files from
5 > /etc/profile:
6 > FILES
7 > /bin/bash
8 > The bash executable
9 > /etc/profile
10 > The systemwide initialization file, executed for login
11 > shells
12 >
13 >
14 > Where real life uses /etc/bash/bashrc
15 > This part is taken from strace dump: strace bash -i
16 > open("/etc/bash/bashrc", O_RDONLY|O_LARGEFILE) = 3
17
18 It reads both, this is from /etc/profile
19
20 if [ -n "${BASH_VERSION}" ] ; then
21 # Newer bash ebuilds include /etc/bash/bashrc which will setup PS1
22 # including color. We leave out color here because not all
23 # terminals support it.
24 if [ -f /etc/bash/bashrc ] ; then
25 # Bash login shells run only /etc/profile
26 # Bash non-login shells run only /etc/bash/bashrc
27 # Since we want to run /etc/bash/bashrc regardless, we source it
28 # from here. It is unfortunate that there is no way to do
29 # this *after* the user's .bash_profile runs (without putting
30 # it in the user's dot-files), but it shouldn't make any
31 # difference.
32 . /etc/bash/bashrc
33
34
35 --
36 Neil Bothwick
37
38 "Come on! It's a whole new life out there!"
39 "Oh, no. Not another one!"

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] man bash document doesn't match real life bash. Etaoin Shrdlu <shrdlu@×××××××××××××.org>
Re: [gentoo-user] man bash document doesn't match real life bash. David Harel <hareldvd@××××××××××××.com>