summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluke <luke@1f5c1d6a-bddf-0310-8f58-fc49e503516a>2006-06-26 22:18:08 +0000
committerluke <luke@1f5c1d6a-bddf-0310-8f58-fc49e503516a>2006-06-26 22:18:08 +0000
commitba2e18916d8c1071ee0b983b6e9f1fc4dbfbcbb9 (patch)
tree716ab0f8d8a8abe4a2e3ada7b1c88629884903d7
parent9f14df9171baf9ba8c65b22e1c240a8205c0fbd2 (diff)
downloadfacter-ba2e18916d8c1071ee0b983b6e9f1fc4dbfbcbb9.tar.gz
facter-ba2e18916d8c1071ee0b983b6e9f1fc4dbfbcbb9.tar.xz
facter-ba2e18916d8c1071ee0b983b6e9f1fc4dbfbcbb9.zip
removing processor.rb in case it has the same problems as the memory file
git-svn-id: http://reductivelabs.com/svn/facter/trunk@145 1f5c1d6a-bddf-0310-8f58-fc49e503516a
-rw-r--r--lib/facter/processor.rb48
1 files changed, 0 insertions, 48 deletions
diff --git a/lib/facter/processor.rb b/lib/facter/processor.rb
deleted file mode 100644
index f353e71..0000000
--- a/lib/facter/processor.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# processor.rb
-# Additional Facts about the machine's CPUs
-#
-# Copyright (C) 2006 Mooter Media Ltd
-# Author: Matthew Palmer <matt@solutionsfirst.com.au>
-#
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation (version 2 of the License)
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston MA 02110-1301 USA
-#
-
-if Facter.kernel == "Linux"
- processor_num = -1
- processor_list = []
- File.readlines("/proc/cpuinfo").each do |l|
- if l =~ /processor\s+:\s+(\d+)/
- processor_num = $1.to_i
- elsif l =~ /model name\s+:\s+(.*)\s*$/
- processor_list[processor_num] = $1 unless processor_num == -1
- processor_num = -1
- end
- end
-
- Facter.add("ProcessorCount") do
- confine :kernel => :linux
- setcode do
- processor_list.length.to_s
- end
- end
-
- processor_list.each_with_index do |desc, i|
- Facter.add("Processor#{i}") do
- confine :kernel => :linux
- setcode do
- desc
- end
- end
- end
-end