FreeBSD do not use /etc/environment file for global variables. Instead we use two
places to set the variable:
- /etc/profile for sh(1)
- /etc/csh.login for csh(1) which is the default shell for FreeBSD
Fixes for MODULES-7819 issue
need to fiddle with it. The default case statement, "do nothing"
is all fine here.
Facter::Util::Resolution.with_env is long time gone since
Facter > 2.x. That was even longer before introduced by me.
Remove that OpenBSD special case in the java_version fact,
and assume that $PATH is properly set in order to find
the 'java' binary.
Additionally confine the java_default_home and java_libjvm_path
to OpenBSD kernel as well. Add some flesh to the java_default_home
fact to allow it to find the java binary.
This commit changes the way the JAVA_HOME variable is added to
/etc/environment from using a file resource to using an exec
resource. This way we can avoid resource conflicts with the
file.
Signed-off-by: Nate Potter <ntpttr@gmail.com>
This patch adds the java_home variable to all supported
operating systemd, and gives the user the option to
set it themselves. It also updates config.pp to
ensure that the JAVA_HOME variable is set to
the desired java_home.
In some cases it can cause problems and report these kind of errors:
$ update-java-alternatives -s /usr/lib/jvm/java-1.7.0-openjdk-amd64 --jre
update-alternatives: error: no alternatives for policytool
update-alternatives: error: no alternatives for policytool