Detect which sysvinit is enabled for sabayon hosts

This commit is contained in:
2013-10-13 19:00:35 +01:00
parent f87828f72c
commit b9123773d1

10
lib/facter/init.rb Normal file
View File

@@ -0,0 +1,10 @@
# init.rb
# Determine the init system in use on Sabayon/Gentoo systems
Facter.add("init") do
setcode do
%x{/usr/bin/eselect sysvinit list | /bin/grep '\\[' | /bin/grep '\\*' | /usr/bin/awk '{print $2}'}.chomp
end
end