Replace custom fact with executable fact

Should solve #4
This commit is contained in:
Alexander "Ace" Olofsson
2017-03-12 23:46:36 +01:00
parent c87ceb824b
commit 0bc87f0cbf
2 changed files with 5 additions and 11 deletions

5
facts.d/sabayon.sh Normal file
View File

@@ -0,0 +1,5 @@
#!/bin/sh
if [ -f /etc/sabayon-release ]; then
echo "operatingsystem=Sabayon"
fi

View File

@@ -1,11 +0,0 @@
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, lsbdistid: :sabayon
setcode do
'Sabayon'
end
end