apache/cloudstack — pull request #15 by lsimons (2014-09-04 08:42:35+00:00)
Title: Fix CLOUDSTACK-7476: always pass along $JAVA_HOME

On a secured environment (selinux w/ env_reset enabled in sudoers), the
runuser command that is invoked by the daemon() function does not pass
along environment variables, so $JAVA_HOME is empty, and JSVC falls
back to its default behavior, which may not find java or may not find
the intended java.

This fix simply passes $JAVA_HOME explicitly using the -home argument to
JSVC.