Add support for OpenBSD, and also add some regression tests.
Add info about OpenBSD support to README.md and metadata.json Add a note about OpenBSD java_version fact to README.markdown. Fixup wording on context in one of the java patch level regression tests. No mentioning of OpenBSD in metdata.json Cleanup wording of context as suggested by @elyscape update contexts as suggested by @elyscape
This commit is contained in:
@@ -18,3 +18,14 @@ Facter.add(:java_version) do
|
||||
end
|
||||
end
|
||||
end
|
||||
Facter.add(:java_version) do
|
||||
confine :operatingsystem => 'OpenBSD'
|
||||
has_weight 100
|
||||
setcode do
|
||||
Facter::Util::Resolution.with_env("PATH" => '/usr/local/jdk-1.7.0/jre/bin:/usr/local/jre-1.7.0/bin') do
|
||||
if Facter::Util::Resolution.which('java')
|
||||
Facter::Util::Resolution.exec('java -Xmx8m -version 2>&1').lines.first.split(/"/)[1].strip
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user