service "ttyS#{unit}" do
provider Chef::Provider::Service::Upstart
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true, :reload => false
subscribes :restart, "template[/etc/init/ttyS#{unit}.conf]"
end
end
service "irqbalance" do
- action [ :start, :enable ]
+ action [:start, :enable]
supports :status => false, :restart => true, :reload => false
subscribes :restart, "template[/etc/default/irqbalance]"
end
end
node[:block_device].each do |name, attributes|
- if attributes[:vendor] == "HP" && attributes[:model] == "LOGICAL VOLUME"
- if name =~ /^cciss!(c[0-9]+)d[0-9]+$/
- status_packages["cciss-vol-status"] |= [ "cciss/#{Regexp.last_match[1]}d0" ]
- else
- Dir.glob("/sys/block/#{name}/device/scsi_generic/*").each do |sg|
- status_packages["cciss-vol-status"] |= [ File.basename(sg) ]
- end
+ next unless attributes[:vendor] == "HP" && attributes[:model] == "LOGICAL VOLUME"
+
+ if name =~ /^cciss!(c[0-9]+)d[0-9]+$/
+ status_packages["cciss-vol-status"] |= ["cciss/#{Regexp.last_match[1]}d0"]
+ else
+ Dir.glob("/sys/block/#{name}/device/scsi_generic/*").each do |sg|
+ status_packages["cciss-vol-status"] |= [File.basename(sg)]
end
end
end
end
service "#{status_package}d" do
- action [ :start, :enable ]
+ action [:start, :enable]
supports :status => false, :restart => true, :reload => false
subscribes :restart, "template[/etc/default/#{status_package}d]"
end
end
service "watchdog" do
- action [ :enable, :start ]
+ action [:enable, :start]
end
end