Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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: from sonar/bin/linux-x86-64
EDIT: sonar.log from sonar/logs

share|improve this question
up vote 1 down vote accepted

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.


Unable to start JVM: No such file or directory

Does JAVA_HOME/bin/ is already in your PATH?

share|improve this answer
Well, as I sad, I don't know how Solar is searching for Java. It's not JAVA_HOME or other well-known variables, because they are set early enough. – Aug 21 '11 at 13:16
Could you please post the init script for Solar? – quanta Aug 21 '11 at 13:53
@quenta done, edited question – Aug 21 '11 at 21:16
What error you get when starting – quanta Aug 22 '11 at 2:07
@quante see 2nd edit: log messages, such as "wrapper started as daemon", do not appear inside the script pasted before. – Aug 22 '11 at 8:10

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?

share|improve this answer
In general, for init scripts either use the fully qualified path to the executable and setup the exact environment variables you need. – Joshua Hoblitt Aug 22 '11 at 9:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.