Update operatingsystem.rb

Use additional confines instead of checks in setcode to detect the distribution ID
This commit is contained in:
Alexander "Ace" Olofsson
2016-10-31 09:31:41 +01:00
committed by GitHub
parent 9d89654211
commit c46c360eb0

View File

@@ -2,13 +2,10 @@ Facter.add(:operatingsystem) do
# Sabayon Linux is a variant of Gentoo so this resolution needs to come
# before the Gentoo resolution.
has_weight(100)
confine :kernel => :linux
confine kernel: :linux, lsbdistid: :sabayon
setcode do
distid = Facter.value(:lsbdistid)
if distid == "Sabayon"
'Sabayon'
end
'Sabayon'
end
end