Re: Startup question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael Sullivan kirjoitti viestissään (lähetysaika perjantai, 2. 
heinäkuuta 2004 05:34):
> Does /etc/profile when the system starts up or does it only
> execute when a user logs in?

It's read whenever a new bash login shell is started.

> I need to set my JAVA_HOME 
> variable for Tomcat when the system starts up.  In my
> /etc/rc.d/rc.local file I have:
>
> JAVA_HOME=/usr/local/java.sdk
> export JAVA_HOME

This has effect only within the rc.local script and in programs 
started from rc.local.

> I "echo $JAVA_HOME" and it give me blank lines, as if
> $JAVA_HOME was never set.  I am doing this right, aren't I?

No. You must understand that Unix/Linux environment variables 
aren't global (like in that other OS), they are inherited from 
the parent process. Use the shell startup files to set up the 
environment.

-- 
	Markku Kolkka
	markku.kolkka@xxxxxx



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux