end
disks.each do |disk|
- if disk[:device] =~ /^cciss\/(.*)$/
+ if disk[:device] =~ %r{^cciss/(.*)$}
id = File.read("/sys/bus/cciss/devices/#{Regexp.last_match[1]}/unique_id").chomp
disk[:munin] = "cciss-3#{id.downcase}"
service "smartmontools" do
action [:enable, :start]
+ supports :status => true, :restart => true, :reload => true
end
disks.each do |disk|
end
plugins = Dir.glob("/etc/munin/plugins/smart_*").map { |p| File.basename(p) } -
- disks.map { |d| "smart_#{d[:munin_name]}" }
+ disks.map { |d| "smart_#{d[:munin]}" }
plugins.each do |plugin|
munin_plugin plugin do