diff options
author | Marc Fournier <marc.fournier@camptocamp.com> | 2010-09-10 19:02:44 +0200 |
---|---|---|
committer | Daniel Pittman <daniel@rimspace.net> | 2011-01-31 12:55:25 -0800 |
commit | 0d7a2e683125028758ae91d3754c0466fd068cf3 (patch) | |
tree | 476f9a0af5446613d1ebb7519bcb2ba3ecc77d6d /lib/facter/processor.rb | |
parent | ecd7cda64bdf3c8cd97b7c05f9cf7eb890d3682b (diff) | |
download | facter-0d7a2e683125028758ae91d3754c0466fd068cf3.tar.gz facter-0d7a2e683125028758ae91d3754c0466fd068cf3.tar.xz facter-0d7a2e683125028758ae91d3754c0466fd068cf3.zip |
Fix #4755: add support for GNU/kFreeBSD platform where missing.
Merged manually to the current state of the art. Minimal conflicts resolved
by adding both Darwin and GNU/KFreeBSD to the confine lines.
Author: Marc Fournier <marc.fournier@camptocamp.com>
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
Signed-off-by: Rick Bradley <rick@rickbradley.com>
Diffstat (limited to 'lib/facter/processor.rb')
-rw-r--r-- | lib/facter/processor.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/facter/processor.rb b/lib/facter/processor.rb index 53998ff..ac75867 100644 --- a/lib/facter/processor.rb +++ b/lib/facter/processor.rb @@ -7,7 +7,7 @@ require 'thread' -if Facter.value(:kernel) == "Linux" +if ["Linux", "GNU/kFreeBSD"].include? Facter.value(:kernel) processor_num = -1 processor_list = [] Thread::exclusive do @@ -22,7 +22,7 @@ if Facter.value(:kernel) == "Linux" end Facter.add("ProcessorCount") do - confine :kernel => :linux + confine :kernel => [ :linux, :"gnu/kfreebsd" ] setcode do processor_list.length.to_s end @@ -30,7 +30,7 @@ if Facter.value(:kernel) == "Linux" processor_list.each_with_index do |desc, i| Facter.add("Processor#{i}") do - confine :kernel => :linux + confine :kernel => [ :linux, :"gnu/kfreebsd" ] setcode do desc end |