Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Aug 2020 14:03:33 -0600
From:      Gary Aitken <freebsd@dreamchaser.org>
To:        Ottavio Caruso <ottavio2006-usenet2012@yahoo.com>, freebsd-questions@freebsd.org
Subject:   Re: Bash Does Not Source /etc/profile
Message-ID:  <5641a50a-e43c-1c3c-7759-8578dd8bd871@dreamchaser.org>
In-Reply-To: <rhmg6q$1390$1@ciao.gmane.io>
References:  <0a5901d67721$02a62f80$07f28e80$@gmail.com> <rhmg6q$1390$1@ciao.gmane.io>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On 8/20/20 12:42 PM, Ottavio Caruso via freebsd-questions wrote:
> On 20/08/2020 19:37, Drew Tomlinson wrote:
>> I performed an binary upgrade from 12.0-p3 to 12.1-p8 and
>> recompiled all ports.  My shell is set to /usr/local/bin/bash in
>> /etc/passwd.  One thing that's puzzling is that /etc/profile is no
>> longer sourced when I log in. However, if I source /etc/profile
>> after I log in, there are no errors.
>> 
>> I have verified my shell is both login and interactive with these
>> code snippets I found on the web:
>> 
>> [drew@blackcloud ~]$ shopt -q login_shell && echo 'Login shell' ||
>> echo 'Not login shell' Login shell [drew@blackcloud ~]$ [[ $- ==
>> *i* ]] && echo 'Interactive' || echo 'Not interactive' Interactive
>> 
>> What else should I check?
> 
> Copy ~/.profile to ~/.bash_profile and source /etc/profile from
> there.

I don't *think* a copy should be necessary:

$ strings $(which bash) | grep profile
noprofile
/etc/profile
~/.profile
~/.bash_profile
$ strings $(which bash) | grep shrc
~/.bashrc

But to the original question, why are you expecting errors?

Gary



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?5641a50a-e43c-1c3c-7759-8578dd8bd871>