summaryrefslogtreecommitdiff
path: root/lib/ohai/plugins/cpu.rb
diff options
context:
space:
mode:
authorJohn <john.mccrae@progress.com>2023-02-13 14:59:16 -0800
committerJohn <john.mccrae@progress.com>2023-02-13 15:08:45 -0800
commit3dc34edb4e17bb8fb0642d31cc4aa0f7f1a66609 (patch)
tree81ffba42a3225030620c7821e213e9e92c0d3d7e /lib/ohai/plugins/cpu.rb
parenta7c886f77bdf7e9690eb3e869d5a4b8de7bec631 (diff)
downloadohai-3dc34edb4e17bb8fb0642d31cc4aa0f7f1a66609.tar.gz
Moving from using Regex matching for simple literals
Signed-off-by: John <john.mccrae@progress.com>
Diffstat (limited to 'lib/ohai/plugins/cpu.rb')
-rw-r--r--lib/ohai/plugins/cpu.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ohai/plugins/cpu.rb b/lib/ohai/plugins/cpu.rb
index 897f716b..3a5412b1 100644
--- a/lib/ohai/plugins/cpu.rb
+++ b/lib/ohai/plugins/cpu.rb
@@ -524,7 +524,8 @@ Ohai.plugin(:CPU) do
cpu[index] = Mash.new
cpu[index][:status] = status
cpu[index][:location] = location
- if /Available/.match?(status)
+ if status.include?("Available")
+ # if /Available/.match?(status)
cpu[:available] += 1
lsattr = shell_out("lsattr -El #{name}").stdout.lines
lsattr.each do |attribute|