From owner-freebsd-questions@FreeBSD.ORG Fri Mar 6 02:27:17 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13DF61065670 for ; Fri, 6 Mar 2009 02:27:17 +0000 (UTC) (envelope-from frank@esperance-linux.co.uk) Received: from mailout.zetnet.co.uk (mailout.zetnet.co.uk [194.247.47.231]) by mx1.freebsd.org (Postfix) with ESMTP id C017F8FC12 for ; Fri, 6 Mar 2009 02:27:16 +0000 (UTC) (envelope-from frank@esperance-linux.co.uk) Received: from irwell.zetnet.co.uk ([194.247.47.48] helo=zetnet.co.uk) by mailout.zetnet.co.uk with esmtp (Exim 4.63) (envelope-from ) id 1LfPmK-0002c3-0a; Fri, 06 Mar 2009 02:27:12 +0000 Received: from melon.esperance-linux.co.uk (54-144.adsl.zetnet.co.uk [194.247.54.144]) by zetnet.co.uk (8.14.1/8.14.1/Debian-9) with ESMTP id n262RBBl008653; Fri, 6 Mar 2009 02:27:11 GMT Received: by melon.esperance-linux.co.uk (Postfix, from userid 1001) id 74B85FCA6A0; Fri, 6 Mar 2009 02:27:06 +0000 (GMT) Date: Fri, 6 Mar 2009 02:27:06 +0000 From: Frank Shute To: Peter Steele Message-ID: <20090306022706.GA38428@melon.esperance-linux.co.uk> Mail-Followup-To: Peter Steele , freebsd-questions@freebsd.org References: <20090306004003.99091e42.freebsd@edvax.de> <31137799.01236305475066.JavaMail.HALO$@halo> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <31137799.01236305475066.JavaMail.HALO$@halo> User-Agent: Mutt/1.4.2.3i X-Face: *}~{PHnDTzvXPe'wl_-f%!@+r5; VLhb':*DsX%wEOPg\fDrXWQJf|2\,92"DdS%63t*BHDyQ|OWo@Gfjcd72eaN!4%NE{0]p)ihQ1MyFNtWL X-Operating-System: FreeBSD 6.4-RELEASE-p2 i386 X-Organisation: 'http://www.shute.org.uk/' X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.1.7 (zetnet.co.uk [194.247.46.1]); Fri, 06 Mar 2009 02:27:11 +0000 (GMT) Cc: freebsd-questions@freebsd.org Subject: Re: /bin/sh does not read profile X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Frank Shute List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2009 02:27:17 -0000 On Thu, Mar 05, 2009 at 06:11:18PM -0800, Peter Steele wrote: > > >I first wondered why none of my commands in "/etc/profile" and > >"~/.profile" got executed. Finally, I modified > >"/usr/src/bin/sh/main.c" to trace what files are read, recompiled > >the "sh" command and: the only file that is executed is "~/.shrc". > > > >I just cannot believe that FreeBSD has such a severe bug. What is > >going wrong here? > > I have a similar problem, but with bash. I have both my personal > account and root set to use bash instead of sh and when I login the > .bashrc file is not read. My system does not have an X environment, > it's plain old BSD. How can I get it to load .bashrc when I login? > I'm using a 7.0 binary release. You should be able to put: source $HOME/.bashrc in ~/.bash_profile That's if $HOME is set. Otherwise use the full path. Regards, -- Frank Contact info: http://www.shute.org.uk/misc/contact.html