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
# Sabayon Linux is a variant of Gentoo so this resolution needs to come
# before the Gentoo resolution.
has_weight(10)
confine :kernel => :linux
confine :has_entropy => true
setcode do
if FileTest.exists?("/etc/sabayon-release")
"Sabayon"
release_info = Facter::Util::Operatingsystem.os_release
if release_info['NAME'] == "Sabayon"
'Sabayon'
end
end
end