Fix identification of HP RID controllers with newer kernels
authorTom Hughes <tom@compton.nu>
Wed, 18 May 2016 07:58:57 +0000 (08:58 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 18 May 2016 07:58:57 +0000 (08:58 +0100)
cookbooks/hardware/templates/default/ohai.rb.erb

index 1e7ca87..fec5d6b 100644 (file)
@@ -358,6 +358,8 @@ Ohai.plugin(:Hardware) do
         controller[:device] = File.basename(device).sub(/^cciss(\d+)$/, "/dev/cciss/c\\1d0")
       elsif device = Dir.glob("/sys/bus/pci/devices/#{controller[:pci_slot]}/host*/target*:3:0/*:3:0:0/scsi_generic/sg*").first
         controller[:device] = "/dev/#{File.basename(device)}"
+      elsif device = Dir.glob("/sys/bus/pci/devices/#{controller[:pci_slot]}/host*/target*:1:0/*:1:0:0/scsi_generic/sg*").first
+        controller[:device] = "/dev/#{File.basename(device)}"
       end
     end
   end