From 91e159fe6f3267e4e60846dfbf0f48b216badba9 Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Mon, 10 Oct 2016 21:14:27 +0100 Subject: [PATCH] Override the operatingsystem fact definition for sabayon --- lib/facter/operatingsystem.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 lib/facter/operatingsystem.rb diff --git a/lib/facter/operatingsystem.rb b/lib/facter/operatingsystem.rb new file mode 100644 index 0000000..4d57885 --- /dev/null +++ b/lib/facter/operatingsystem.rb @@ -0,0 +1,14 @@ +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 + + setcode do + distid = Facter.value(:lsbdistid) + if distid == "Sabayon" + 'Sabayon' + end + end + end +