]> git.openstreetmap.org Git - chef.git/blob - cookbooks/devices/templates/default/udev.rules.erb
Autoload CPU supprt modules correctly on 12.04 machines with new kernels
[chef.git] / cookbooks / devices / templates / default / udev.rules.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 # HP Smart Array configuration
4 ACTION=="add", SUBSYSTEM=="block", ENV{ID_VENDOR}=="HP", ENV{ID_MODEL}=="LOGICAL_VOLUME", ATTR{queue/scheduler}="noop"
5 ACTION=="add", SUBSYSTEM=="block", ENV{ID_VENDOR}=="HP", ENV{ID_MODEL}=="LOGICAL_VOLUME", ATTR{queue/nr_requests}="512"
6 ACTION=="add", SUBSYSTEM=="block", ENV{ID_VENDOR}=="HP", ENV{ID_MODEL}=="LOGICAL_VOLUME", ATTR{queue/read_ahead_kb}="4096"
7 <% node[:devices].each do |name,device| -%>
8
9 # <%= device[:comment] %>
10 <% if device[:type] == "block" -%>
11 <% if device[:owner] -%>
12 SUBSYSTEM=="block", ENV{ID_BUS}=="<%= device[:bus] %>", ENV{ID_SERIAL}=="<%= device[:serial] %>", OWNER="<%= device[:owner] %>"
13 <% end -%>
14 <% if device[:group] -%>
15 SUBSYSTEM=="block", ENV{ID_BUS}=="<%= device[:bus] %>", ENV{ID_SERIAL}=="<%= device[:serial] %>", GROUP="<%= device[:group] %>"
16 <% end -%>
17 <% if device[:mode] -%>
18 SUBSYSTEM=="block", ENV{ID_BUS}=="<%= device[:bus] %>", ENV{ID_SERIAL}=="<%= device[:serial] %>", MODE="<%= device[:mode] %>"
19 <% end -%>
20 <% if device[:attrs] -%>
21 <% device[:attrs].each do |name,value| -%>
22 ACTION=="add", SUBSYSTEM=="block", ENV{ID_BUS}=="<%= device[:bus] %>", ENV{ID_SERIAL}=="<%= device[:serial] %>", ATTR{<%= name %>}="<%= value %>"
23 <% end -%>
24 <% end -%>
25 <% end -%>
26 <% end -%>
27 <% if node[:lsb][:release] == "12.04" && node[:kernel][:release].to_f >= 3.11 -%>
28
29 # Rule from 14.04 udev for 12.04 machines running newer kernels
30 ACTION=="add", SUBSYSTEM=="cpu", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe -bv $env{MODALIAS}"
31 <% end -%>