Change path in rc.sysinit
Hello,
I have a rc.sysinit that runs at startup and first line outside of #!/bin/sh is to set the PATH=xxxx:xxxx Later on in the same script (after sourcing two others) there is an if statement that checks if a directory exists, if so, it does (indented) PATH=$PATH:/additional/path However once booted, the /additional/path is not there? Any ideas on what's going wrong? Thanks!! |
I think you misunderstand what the rc files are for. These files (when they work as intended) start processes, services, set system, and exit. Changes to the environment in these will last exactly as long as the script runs and no longer.
You are, I believe, looking for /etc/profile (or a file in /etc/profile.d) or /etc/bashrc if your system is bash centric, to set the environment for users at logon. Changes to the environment in these (done right) will be visible every time you log into the system and for all users. |
Quote:
|
All times are GMT -5. The time now is 04:44 PM. |