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 1IZANV-0001vd-7X for garchives@archives.gentoo.org; Sat, 22 Sep 2007 19:10:57 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.1/8.14.0) with SMTP id l8MJ1Xst017298; Sat, 22 Sep 2007 19:01:33 GMT Received: from mail33.opentransfer.com (MAIL33.opentransfer.com [76.162.254.33]) by robin.gentoo.org (8.14.1/8.14.0) with SMTP id l8MIvE3q011045 for ; Sat, 22 Sep 2007 18:57:14 GMT Received: (qmail 8272 invoked by uid 399); 22 Sep 2007 18:57:12 -0000 Received: from unknown (HELO ?192.168.1.5?) (89.139.69.122) by mail33.opentransfer.com with SMTP; 22 Sep 2007 18:57:12 -0000 Message-ID: <46F57719.6040904@ergolight-sw.com> Date: Sat, 22 Sep 2007 22:12:09 +0200 From: David Harel User-Agent: Thunderbird 2.0.0.6 (X11/20070806) 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 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] man bash document doesn't match real life bash. References: <46F13A34.4080201@ergolight-sw.com> <20070919142308.259ef440@zaphod.digimed.co.uk> In-Reply-To: <20070919142308.259ef440@zaphod.digimed.co.uk> X-Enigmail-Version: 0.95.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: f9b32562-fdee-4725-8eb4-d9ab1c5d6742 X-Archives-Hash: 390a05a623e24d4eb31c53a9675d1e61 As Etaoin Shrdlu said, bash does not even start /etc/profile. Below grep on strace output on bash: $ grep profile /tmp/bash.trace $ $ # My comment, it got nothing $ grep bashrc /tmp/bash.trace open("/etc/bash/bashrc", O_RDONLY|O_LARGEFILE) = 3 read(3, "# /etc/bash/bashrc\n#\n# This file"..., 2540) = 2540 open("/home/harel/.bashrc", O_RDONLY|O_LARGEFILE) = 3 Neil Bothwick wrote: > 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 > > > -- Regards. David Harel, ================================== Home office +972 77 7657645 Fax: +972 77 7657645 Cellular: +972 54 4534502 Snail Mail: Amuka D.N Merom Hagalil 13802 Israel Email: hareldvd@ergolight-sw.com -- gentoo-user@gentoo.org mailing list