Update operatingsystem fact to support Sabayon the official way

This commit is contained in:
2014-07-27 17:12:23 +01:00
parent ce1ae3f96f
commit 6dd8ff3a2f

View File

@@ -1,11 +1,13 @@
Facter.add(:operatingsystem) do Facter.add(:operatingsystem) do
confine :kernel => :linux # Sabayon Linux is a variant of Gentoo so this resolution needs to come
confine :has_entropy => true # before the Gentoo resolution.
has_weight(10)
confine :kernel => :linux
setcode do setcode do
if FileTest.exists?("/etc/sabayon-release") release_info = Facter::Util::Operatingsystem.os_release
"Sabayon" if release_info['NAME'] == "Sabayon"
end 'Sabayon'
end end
end
end end