X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/513c74ba85bbadecbf8c51ee2b91d9faeb9e68f5..08c435b987e0d5035af9cfa6480e8c04b7466303:/cookbooks/hardware/recipes/default.rb diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index 2f8a4398e..c29185248 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -300,7 +300,7 @@ end disks = node[:hardware][:disk][:disks].map do |disk| if disk[:smart_device] controller = node[:hardware][:disk][:controllers][disk[:controller]] - device = File.basename(controller[:device]) + device = controller[:device].sub("/dev/", "") smart = disk[:smart_device] if device.start_with?("cciss/") && smart =~ /^cciss,(\d+)$/ @@ -312,7 +312,7 @@ disks = node[:hardware][:disk][:disks].map do |disk| munin = "#{device}-#{Regexp.last_match(1)}:#{Regexp.last_match(2)}" end else - device = File.basename(disk[:device]) + device = disk[:device].sub("/dev/", "") munin = device end