Use systemd to manage kmod on Ubuntu 15.10
authorTom Hughes <tom@compton.nu>
Fri, 8 Jan 2016 22:49:47 +0000 (22:49 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 8 Jan 2016 22:49:47 +0000 (22:49 +0000)
cookbooks/hardware/recipes/default.rb

index 867f3a8..8ba21da 100644 (file)
@@ -443,7 +443,11 @@ if node[:lsb][:release].to_f <= 12.10
   end
 else
   service "kmod" do
-    provider Chef::Provider::Service::Upstart
+    if node[:lsb][:release].to_f >= 15.10
+      provider Chef::Provider::Service::Systemd
+    else
+      provider Chef::Provider::Service::Upstart
+    end
     action :nothing
     subscribes :start, "template[/etc/modules]"
   end