On 6/16/06, Bryan J. Smith
On Fri, 2006-06-16 at 10:00 +0200, Marius Roets wrote:
Any ideas why this happens. (cut discussion of multiple PATH insertions/runs) I am using Suse 10.0 btw.
It means that the .bashrc is getting run several times, pre-pending the new path to it. Or it could be that the pre-pend has been added in another file that you didn't know about. An easy way to check is to remove the pre-pend from your .bashrc, logout and then log back in to see.
I know Red Hat and SuSE different logic for profile, .bashrc, .bash_profile, etc... between user, system, etc... I haven't gotten the entire logic flow down for SuSE, and I'd be very interested if there is a document, FAQ, HOWTO, etc... out there that shows the _entire_logic_ of what and how different system and user files are executed in what order for a bash login shell under SuSE.
One thing Red Hat does in its system-wide /etc/bashrc is offer a function called "pathmunge()" to avoid such a scenario, but I don't think that's LSB. I assume SuSE has something similar? Possibly more LSB-compliant?
suse-10 too has shell code in /etc/profile which looks like : if test -n "$PROFILEREAD" ; then PATH=/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/java/jdk1.5.0/bin if test "$HOME" != "/" ; then for dir in $HOME/bin/$CPU $HOME/bin ; do test -d $dir && PATH=$dir:$PATH done fi if test "$UID" = 0 ; then test -d /opt/gnome/sbin && PATH=/opt/gnome/sbin:$PATH test -d /opt/kde3/sbin && PATH=/opt/kde3/sbin:$PATH PATH=/sbin:/usr/sbin:/usr/local/sbin:$PATH fi for dir in /var/lib/dosemu \ /usr/games \ /opt/bin \ /opt/gnome/bin \ /opt/kde3/bin \ /opt/kde2/bin \ /opt/kde/bin \ /opt/eclipse \ /usr/openwin/bin \ /opt/cross/bin \ do test -d $dir && PATH=$PATH:$dir done unset dir fi add all your paths here in the newline separated entries....and they wont be appended to the $PATH again as $PROFILEREAD will be TRUE -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com