diff options
| author | Matt Robinson <matt@puppetlabs.com> | 2011-03-16 17:24:32 -0700 |
|---|---|---|
| committer | Matt Robinson <matt@puppetlabs.com> | 2011-03-16 17:24:32 -0700 |
| commit | e37ba05100330fa7d492f267ffae57aa93ad53d2 (patch) | |
| tree | 9557a98551ebfc1b39bc074ca63f5fe4859e0922 /lib/facter/processor.rb | |
| parent | 469d2a26a467c50af9f9732d7f98e8a01ecc369f (diff) | |
| parent | 458a22d472334e4239397f3077e6366a9d7e9973 (diff) | |
Merge branch 'next'
* next:
Incremented release to 1.5.9
Fixed #6719 Typo
(#5011) Adds swap statistics for OSX
(#6719) Restricts virtualization types for zones
Fixed #6616 - Stubbing in VMware tests on Linux
Remove Solaris from the list of confined systems. It won't get the original lsb facts, and it's nonsensical too.
Fix #6679 - Added Scientific Linux to operatingsystem fact
Further fix to #5485 - SELinux facts
(#2721) Merged patch from Brane GraAnar
(#5485) Made selinux_mode fact work
Fixed #5485 - Updated selinux_mode fact
Fix for #6495 - Updated interface detection
Fixed #5699 - Added processorcount support for S390x
Fixed #5699 - Added virtual support for s390x/Zlinux
Diffstat (limited to 'lib/facter/processor.rb')
| -rw-r--r-- | lib/facter/processor.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/facter/processor.rb b/lib/facter/processor.rb index ac75867..c71bad4 100644 --- a/lib/facter/processor.rb +++ b/lib/facter/processor.rb @@ -17,6 +17,9 @@ if ["Linux", "GNU/kFreeBSD"].include? Facter.value(:kernel) elsif l =~ /model name\s+:\s+(.*)\s*$/ processor_list[processor_num] = $1 unless processor_num == -1 processor_num = -1 + elsif l =~ /processor\s+(\d+):\s+(.*)/ + processor_num = $1.to_i + processor_list[processor_num] = $2 unless processor_num == -1 end end end @@ -80,9 +83,9 @@ if Facter.value(:kernel) == "OpenBSD" Facter::Util::Resolution.exec("uname -p") end end - + Facter.add("ProcessorCount") do - confine :kernel => :openbsd + confine :kernel => :openbsd setcode do Facter::Util::Resolution.exec("sysctl hw.ncpu | cut -d'=' -f2") end |
