Startup question
Markku Kolkka
markkukolkka at kolumbus.fi
Fri Jul 2 11:42:44 UTC 2004
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 at iki.fi
More information about the fedora-list
mailing list