Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 348019 - .bash_profile is called twice after booting from the minimal install CD
Summary: .bash_profile is called twice after booting from the minimal install CD
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: InstallCD (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo LiveCD Package Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-07 10:27 UTC by email200202
Modified: 2013-06-17 16:52 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description email200202 2010-12-07 10:27:06 UTC
While I was customizing the minimal CD, I noticed that /root/.bash_profile is getting called twice. I know it does not matter for most of people but in my case it was a problem.

I found the source problem in /bin/bashlogin script. 
 
$ cat /bin/bashlogin 

#!/bin/bash 

export HOME=/root 
cat /etc/motd 2>/dev/null 
cd /root 
#[[ -e .bash_profile ]] && source .bash_profile 
exec -l /bin/bash -i 

After commenting out the second line from the end, .bash_profile is called only once.



Reproducible: Always

Steps to Reproduce:
1. print a line of text from /root/.bash_profile
2. boot from the CD

Actual Results:  
the line is printed twice

Expected Results:  
.bash_profile called once.
Comment 1 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2013-06-17 16:52:26 UTC
As we have stopped using bashlogin[1] to take care of the automatic login, this should be fixed. Feel free to reopen if you can duplicate this.

 [1] - http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commitdiff;h=89e2c85b20e87394a546410408ab13f40fc3d28e