From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1IXzkF-0004Lr-NR for garchives@archives.gentoo.org; Wed, 19 Sep 2007 13:37:36 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.0/8.14.0) with SMTP id l8JDSDfH018020; Wed, 19 Sep 2007 13:28:13 GMT Received: from mail.digimed.co.uk (82-69-83-178.dsl.in-addr.zen.co.uk [82.69.83.178]) by robin.gentoo.org (8.14.0/8.14.0) with ESMTP id l8JDNChk011680 for ; Wed, 19 Sep 2007 13:23:13 GMT Received: from zaphod.digimed.co.uk (zaphod.digimed.co.uk [192.168.1.1]) by mail.digimed.co.uk (Postfix) with ESMTP id A6BE51C4F3A for ; Wed, 19 Sep 2007 14:23:12 +0100 (BST) Date: Wed, 19 Sep 2007 14:23:08 +0100 From: Neil Bothwick To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] man bash document doesn't match real life bash. Message-ID: <20070919142308.259ef440@zaphod.digimed.co.uk> In-Reply-To: <46F13A34.4080201@ergolight-sw.com> References: <46F13A34.4080201@ergolight-sw.com> Organization: Digital Media Production X-Mailer: Claws Mail 3.0.1cvs7 (GTK+ 2.10.14; x86_64-pc-linux-gnu) X-GPG-Fingerprint: 7260 0F33 97EC 2F1E 7667 FE37 BA6E 1A97 4375 1903 Sender: neil@digimed.co.uk Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_kMsYDYiKoeWz8pqA7kfoCXn; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-Archives-Salt: 5d460b8a-c74c-45fb-8f52-9a6010c1fe62 X-Archives-Hash: 4c01a92aa38a7870534c3092e025d85b --Sig_kMsYDYiKoeWz8pqA7kfoCXn Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable 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 >=20 >=20 > 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) =3D 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 --=20 Neil Bothwick "Come on! It's a whole new life out there!" "Oh, no. Not another one!" --Sig_kMsYDYiKoeWz8pqA7kfoCXn Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) iD8DBQFG8SK/um4al0N1GQMRAu2TAJ4pGqfv2uQMh4jmBqSghfBf/AYVDQCfaVjF 64wQ2J57kt9EwLI6Afhf2gk= =xk0k -----END PGP SIGNATURE----- --Sig_kMsYDYiKoeWz8pqA7kfoCXn-- -- gentoo-user@gentoo.org mailing list