]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/hardware/templates/default/ohai.rb.erb
Extract correct device number for Adaptec disks
[chef.git] / cookbooks / hardware / templates / default / ohai.rb.erb
index b2d56c7d86698e2dc8cbd16eb398b3aa0efcab1a..5916ecc06e4d9dcb60e54e18e65f34c31a150b2a 100644 (file)
@@ -632,7 +632,7 @@ Ohai.plugin(:Hardware) do
           disks << disk
         elsif disk && line =~ /^         Reported Channel,Device\(T:L\)\s*:\s+(\d+),(\d+)\(\d+:0\)\s*$/
           disk[:channel_number] = Regexp.last_match(1)
-          disk[:device_number] = Regexp.last_match(1)
+          disk[:device_number] = Regexp.last_match(2)
         elsif disk && line =~ /^         (\S.*\S)\s*:\s+(\S.*\S)\s*$/
           case Regexp.last_match(1)
           when "Reported Location" then disk[:location] = Regexp.last_match(2)