Messages in this thread | | | From | (Miquel van Smoorenburg) | Subject | Re: How to set a environment varibale from bootup process? | Date | 1 Sep 1999 21:06:44 +0200 |
| |
In article <cistron.37CDAF77.4659B5B8@hn.vnn.vn>, Hoang Manh Hung <hunghm@hn.vnn.vn> wrote: >Im using RH52. I already tried to set a environment variable in some >script in /etc/rc.d, but >after bootup, I logon and it was not there.
That's logical. If you set an environment variable, it is only present in the process you set it in, and the children of those processes. There's no way to set environment variables of unrelated processes.
However you can do this in /etc/initscript. Since init is the parent of _all_ processes, it's environment will propagate to all processes on the system. Read the manual page for initscript(5).
No guarantee that it will be set in interactive sessions as well since a lot of programs, like login, clean up their environment before starting a new session.
Mike. -- ... somehow I have a feeling the hurting hasn't even begun yet -- Bill, "The Terrible Thunderlizards"
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |