I have OpenSuse 11.4.
I start some on-boot scripts inside /etc/init/boot.local
.
Where could I move those scripts so that they would be started after all (most) environment variables got initialized?
These scripts need to be started really once, so things such as /etc/profile.local
aren't candidates.
I try to start Sonar, which searches for Java in some strange way (instead just by look up JAVA_HOME
), and it fails to find Java (logs don't tell me exactly why). From command line, after boot, it can be started (as root and as user).
I suppose, there are some environment variables which get initialized inside services. Can it be that way?
EDIT: sonar.sh from sonar/bin/linux-x86-64
EDIT: sonar.log from sonar/logs
I'm not familiar with openSUSE, but in my opinion, the best way is export the environment variables before starting the services in
/etc/init/boot.local
.EDIT
Does JAVA_HOME/bin/ is already in your PATH?
Normally global variables are not initialized in init-scripts. The variables you need get propably initialized in your shell by /etc/profile.local or some other shell-configuration file.
If a java is being found from the shell where is it located?