Autoload CPU supprt modules correctly on 12.04 machines with new kernels
authorTom Hughes <tom@compton.nu>
Thu, 24 Jul 2014 11:23:10 +0000 (12:23 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 24 Jul 2014 11:25:27 +0000 (12:25 +0100)
cookbooks/devices/templates/default/udev.rules.erb

index 8f40e5b7dc784df0f93c804ee051fddcfe4a3eb1..6a85600261fe1df81a4cfe1981cdb45b9ca21dcf 100644 (file)
@@ -24,3 +24,8 @@ ACTION=="add", SUBSYSTEM=="block", ENV{ID_BUS}=="<%= device[:bus] %>", ENV{ID_SE
 <% end -%>
 <% end -%>
 <% end -%>
+<% if node[:lsb][:release] == "12.04" && node[:kernel][:release].to_f >= 3.11 -%>
+
+# Rule from 14.04 udev for 12.04 machines running newer kernels
+ACTION=="add", SUBSYSTEM=="cpu", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe -bv $env{MODALIAS}"
+<% end -%>