You are not logged in.

#1 2010-12-16 21:11:01

rwd
Member
Registered: 2009-02-08
Posts: 671

[solved] after bash upgrade, 'su -' doesn't source /root/.bashrc

today I did the following ugrade :

bash  -> 4.1.009-3
run-parts  -> 3.4.1-1
ca-certificates   -> 20090814+nmu2-1
ca-certificates-java   -> 20100412-1
driconf   -> 0.9.1-5
filesystem   -> 2010.12-1
lib32-nss 1 -> 3.12.8-1

After that noticed that if I do a 'su -' /root/.bashrc isn't sourced anymore. I solved it by linking  /root/.profile  to /root/.basrc, but I wonder what could be the cause of this.

Judging from 'man bash' it seems as if bash is invoked in 'sh' compatibility mode.

Last edited by rwd (2010-12-16 21:42:52)

Offline

#2 2010-12-16 21:33:55

dyscoria
Member
Registered: 2008-01-10
Posts: 1,007

Re: [solved] after bash upgrade, 'su -' doesn't source /root/.bashrc

Have you got /root/.bash_profile?

Should have inside:

. $HOME/.bashrc

flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)

Offline

#3 2010-12-16 21:42:25

rwd
Member
Registered: 2009-02-08
Posts: 671

Re: [solved] after bash upgrade, 'su -' doesn't source /root/.bashrc

It was missing indeed, and adding it solved it. Strange that it worked without that file before.

Last edited by rwd (2010-12-16 21:45:16)

Offline

#4 2010-12-17 05:53:28

Boris Bolgradov
Member
From: Bulgaria
Registered: 2008-07-27
Posts: 185

Re: [solved] after bash upgrade, 'su -' doesn't source /root/.bashrc

Why is this file needed from now on and why for root only? What's the difference if it sources .bash_profile or .bashrc? Is .bashrc deprecated?

Offline

#5 2010-12-17 12:08:51

Vagabond
Member
Registered: 2010-09-18
Posts: 14

Re: [solved] after bash upgrade, 'su -' doesn't source /root/.bashrc

Good question, Boris.  I could not get my root prompt to work properly until I created the file /root/.bash_login and put the prompt string into it.  I could get the desired prompt by entering # . ~/.bashrc but having .bash_profile set up properly did not work for me.

Last edited by Vagabond (2010-12-17 12:09:42)

Offline

Board footer

Powered by FluxBB