Fix typo in ohai hardware plugin
authorTom Hughes <tom@compton.nu>
Tue, 22 Dec 2015 22:31:41 +0000 (22:31 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 22 Dec 2015 22:31:41 +0000 (22:31 +0000)
cookbooks/hardware/templates/default/ohai.rb.erb

index 06870abad58e1128916c01ca66e0559a8809fa61..bb2ab824e4285ef2c69f1a55f3c8028cabcabb55 100644 (file)
@@ -436,7 +436,7 @@ Ohai.plugin(:Hardware) do
         array[:disks] << disk[:id]
       elsif disk && line =~ /^(\S.*\S)\s*:\s+(\S.*)$/
         case Regexp.last_match(1)
-        when "Device Id" then disk[:smart_devlce] = "megaraid,#{Regexp.last_match(2)}"
+        when "Device Id" then disk[:smart_device] = "megaraid,#{Regexp.last_match(2)}"
         when "WWN" then disk[:wwn] = Regexp.last_match(2)
         when "PD Type" then disk[:interface] = Regexp.last_match(2)
         when "Raw Size" then disk[:size] = memory_to_disk_size(Regexp.last_match(2).sub(/\s*\[.*\]$/, ""))
@@ -466,7 +466,7 @@ Ohai.plugin(:Hardware) do
         end
       elsif disk && line =~ /^(\S.*\S)\s*:\s+(\S.*)$/
         case Regexp.last_match(1)
-        when "Device Id" then disk[:smart_devlce] = "megaraid,#{Regexp.last_match(2)}"
+        when "Device Id" then disk[:smart_device] = "megaraid,#{Regexp.last_match(2)}"
         when "WWN" then disk[:wwn] = Regexp.last_match(2)
         when "PD Type" then disk[:interface] = Regexp.last_match(2)
         when "Raw Size" then disk[:size] = memory_to_disk_size(Regexp.last_match(2).sub(/\s*\[.*\]$/, ""))