projects
/
chef.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b9222d3
)
Extract correct device number for Adaptec disks
author
Tom Hughes
<tom@compton.nu>
Wed, 6 Jan 2016 13:37:04 +0000
(13:37 +0000)
committer
Tom Hughes
<tom@compton.nu>
Wed, 6 Jan 2016 13:37:21 +0000
(13:37 +0000)
cookbooks/hardware/templates/default/ohai.rb.erb
patch
|
blob
|
history
diff --git
a/cookbooks/hardware/templates/default/ohai.rb.erb
b/cookbooks/hardware/templates/default/ohai.rb.erb
index b2d56c7d86698e2dc8cbd16eb398b3aa0efcab1a..5916ecc06e4d9dcb60e54e18e65f34c31a150b2a 100644
(file)
--- a/
cookbooks/hardware/templates/default/ohai.rb.erb
+++ b/
cookbooks/hardware/templates/default/ohai.rb.erb
@@
-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)