From c46c360eb0291042e937ee14e8af5336cd99151b Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Mon, 31 Oct 2016 09:31:41 +0100 Subject: [PATCH] Update operatingsystem.rb Use additional confines instead of checks in setcode to detect the distribution ID --- lib/facter/operatingsystem.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/facter/operatingsystem.rb b/lib/facter/operatingsystem.rb index 4d57885..8c1ccbb 100644 --- a/lib/facter/operatingsystem.rb +++ b/lib/facter/operatingsystem.rb @@ -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