Where to set environment for boot processes
Hi,
Where is the right place to set some environments variables for boot processes (those started from /etc/rc.d/rc.[SM])? I think, /etc/profile is not suitable, since it only effects environments of login sessions). Thanks in advance, |
You can put them into corresponding init scripts or even in inittab itself. More important question - why do you need that, what are you trying to achieve ?
|
Quote:
|
Quote:
taking the first situation, you can write a simple script to set up the env. variable and place it inside /etc/profile.d/, your script will be called everytime at startup. |
Quote:
I think /etc/profile.d/* scripts will not be executed before /etc/rc.d/rc.M get executed, my application was started from rc.M. So, setting variables in /etc/profile.d/* does not help. |
have you tried exporting the variables directly at the top of rc.M (or just before your application is started there)?
|
All times are GMT -5. The time now is 12:07 PM. |