Handle disks attached to a Fusion-MPT controller but not in an array
authorTom Hughes <tom@compton.nu>
Mon, 30 Nov 2015 14:08:58 +0000 (14:08 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 30 Nov 2015 14:09:29 +0000 (14:09 +0000)
cookbooks/hardware/templates/default/ohai.rb.erb

index 88c620fd1d47eb0c6987896641e5292426b43259..2874f3d65898bf9371ad680f3afdb8792380267c 100644 (file)
@@ -435,9 +435,7 @@ Ohai.plugin(:Hardware) do
           controller[:arrays] << array[:id]
 
           arrays << array
-
-          disk = nil
-        elsif array && line =~ /^Device is a Hard disk$/
+        elsif line =~ /^Device is a Hard disk$/
           disk = {
             :id => devices[:disks].count,
             :controller => controller[:id],