The way that SuSE recommends changing the PATH is this:
SuSE sets the default PATH in /etc/profile. They recommend that you do not change /etc/profile because SuSE will clobber your changes whenever you upgrade to a new SuSE release.
They recommend that you make your changes in /etc/profile.local and they will try to preserve that file during upgrades. If /etc/profile.local does not exist you can create it and the boot scripts will run it automatically at boot time. Make your changes as additions to the PATH, not as a replacement. Example:
In /etc/profile.local I placed the command:
export PATH=$PATH:/root/data/commands
which adds a file to the end of my existing PATH.
It is possible to configure the PATH for a user. SuSE combines the functions of .profile and .bashrc into .bashrc. So, if you want to make a PATH unique for a particular user then you would add an export PATH command to /home/user/.bashrc. SuSE does not set the user PATH to anything different.
So getting back to your original question the answer on SuSE is: No, the login shells for user do not replace the default PATH, although they could if they wanted to.
I suspect that when you changed /etc/profile that you placed your PATH statement before the SuSE PATH statement. Later in the code SuSE clobbered your PATH statement with their own. SuSE has some elaborate code for building the PATH and in a casual scan you might not recognize that building the PATH is what they are doing. It is also possible that they changed the code for release 8.2, making it different to what I am describing.
The end result is that the most likely way to get your PATH to work on SuSE is to get rid of your additions to /etc/profile and create a /etc/profile.local that appends the apache and postgresql binaries to the default path. Then boot.
Last edited by jailbait; 08-21-2003 at 03:22 PM.
|