Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 1369 - root's PATH in /etc/profile and profile.env after java
Summary: root's PATH in /etc/profile and profile.env after java
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Karl Trygve Kalleberg (RETIRED)
Depends on:
Reported: 2002-03-27 17:32 UTC by Todd Boland
Modified: 2002-04-09 17:18 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
Description Todd Boland 2002-03-27 17:32:20 UTC
This is more of a two part bug.    
First of all this is my first bug report _on anything_ so forgive my    
inadequacies. I installed sun-jdk-1.4.0 and ran java-config to set it    
accordingly. I then ran env-update and logged out.    
Upon returning I noticed /opt/sun-jdk-1.4.0/bin was not in my PATH. I checked    
out /etc/profile and saw this:    
--8<--- Begin /etc/profile ---8<--    
if [ -e "/etc/profile.env" ]    
  source /etc/profile.env    
#077 would be more secure, but 022 is generally quite realistic    
umask 022    
if [ `/usr/bin/whoami` = 'root' ] ; then    
        export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]'    
        export PATH=/bin:/sbin:/usr/bin:/usr/sbin:${ROOTPATH}    
        export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]'    
        export PATH=/bin:/usr/bin:${PATH}    
unset ROOTPATH    
export EDITOR=/usr/bin/nano    
--8<--- End /etc/profile ---8<--    
Inside /etc/profile.env is where /opt/sun-java-1.4.0/bin is being added to   
PATH. a quick edit of line 11 in /etc/profile.env and I'm set:   
-export PATH=/bin:/sbin:/usr/bin:/usr/sbin:${ROOTPATH} 
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin:${ROOTPATH}:${PATH} 
A minor bug, but still, a bug.
Comment 1 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-04-09 17:18:31 UTC
ROOTPATH is now fixed in java-config 0.2.1, so this should no longer be a problem.