I have been making use of a great set of Bash log in scripts that a co-worker came up with. The scripts check various things to determine what platform, host or location that it is being executed on to set things up appropriately. It works beautifully on my Redhat, Ubuntu, and Debian systems, but my OpenSUSE 11 system was exhibiting a problem.
These scripts are hooked into the normal Bash startup procedure by having .bashrc and .bash_profile symlinked to the startup script. This ensures that they will be run regardless of the type of login (as long as it’s interactive). This works fine on all the other systems since only one of .bashrc or .bash_profile is sourced depending on whether it is a login or non-login session. Or at least that’s how it’s supposed to work (man bash).
The good people at Novell decided to break with this tradition. In /etc/profile they go and source ~/.bashrc calling it a “nice thing”! – http://developer.novell.com/wiki/index.php/Bash_-_What_happens_when_you_invoke_bash
This has the effect of having all these login scripts run twice on OpenSUSE. So, for example, I have to enter the password twice for my ssh key and certain things get displayed twice. I’ve got a crappy work around in place for now, but I really just wish things were left as they were intended.
Filed under: opensuse, Uncategorized, bash, login, opensuse