From 0da0175b3f09fc09bff6050eb94bb6c5fb4b2ea5 Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Mon, 10 Oct 2016 21:14:45 +0100 Subject: [PATCH] Simplify the default for the sabayon systemd service handler --- lib/facter/init.rb | 15 --------------- lib/puppet/provider/service/sabayon.rb | 3 +-- 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 lib/facter/init.rb diff --git a/lib/facter/init.rb b/lib/facter/init.rb deleted file mode 100644 index 9ca0a6e..0000000 --- a/lib/facter/init.rb +++ /dev/null @@ -1,15 +0,0 @@ -# init.rb -# Determine the init system in use on Sabayon/Gentoo systems - - -Facter.add("init") do - setcode do - init = %x{/usr/bin/stat -c '%N' /sbin/init | /usr/bin/awk '{print $3}'}.chomp - if /systemd/.match(init) - 'systemd' - else - 'sysvinit' - end - end -end - diff --git a/lib/puppet/provider/service/sabayon.rb b/lib/puppet/provider/service/sabayon.rb index eb63f98..0439070 100644 --- a/lib/puppet/provider/service/sabayon.rb +++ b/lib/puppet/provider/service/sabayon.rb @@ -3,7 +3,6 @@ Puppet::Type.type(:service).provide :sabayon, :parent => :systemd do desc "Manages `systemd` services using `systemctl`." - defaultfor :operatingsystem => [:sabayon] - defaultfor :osfamily => :gentoo, :init => [:systemd] + defaultfor :operatingsystem => :sabayon end