Simplify the default for the sabayon systemd service handler

This commit is contained in:
2016-10-10 21:14:45 +01:00
parent 91e159fe6f
commit 0da0175b3f
2 changed files with 1 additions and 17 deletions

View File

@@ -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

View File

@@ -3,7 +3,6 @@
Puppet::Type.type(:service).provide :sabayon, :parent => :systemd do Puppet::Type.type(:service).provide :sabayon, :parent => :systemd do
desc "Manages `systemd` services using `systemctl`." desc "Manages `systemd` services using `systemctl`."
defaultfor :operatingsystem => [:sabayon] defaultfor :operatingsystem => :sabayon
defaultfor :osfamily => :gentoo, :init => [:systemd]
end end