Permalink
Browse files

Converted a new fact: physicalprocessorcount

  • Loading branch information...
1 parent f5a9b44 commit 5d77006bcdf7c088b6692382aee28b7c02497b4e @cosimo committed Dec 5, 2010
Showing with 8 additions and 7 deletions.
  1. +8 −0 lib/Facter/physicalprocessorcount.pm
  2. +0 −7 lib/Facter/physicalprocessorcount.rb
@@ -0,0 +1,8 @@
+Facter.add("physicalprocessorcount", sub ($f) {
+ # TODO kernel fact not available yet
+ #$f.confine("kernel", "linux");
+ $f.setcode(block => sub {
+ Facter::Util::Resolution.exec('grep "physical id" /proc/cpuinfo|cut -d: -f 2|sort -u|wc -l');
+ });
+});
+
@@ -1,7 +0,0 @@
-Facter.add("physicalprocessorcount") do
- confine :kernel => :linux
-
- setcode do
- ppcount = Facter::Util::Resolution.exec('grep "physical id" /proc/cpuinfo|cut -d: -f 2|sort -u|wc -l')
- end
-end

0 comments on commit 5d77006

Please sign in to comment.