From 8d18910b28123cab15ae38a8b9ecc60ac6c631c6 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Sun, 4 Oct 2009 22:10:06 +0100 Subject: [PATCH] Add architecture test for FreeBSD boxen. Lets see how much this breaks Signed-off-by: Stephen Gran --- facts/architecture.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 facts/architecture.rb diff --git a/facts/architecture.rb b/facts/architecture.rb new file mode 100644 index 000000000..d6187b238 --- /dev/null +++ b/facts/architecture.rb @@ -0,0 +1,13 @@ +Facter.add(:architecture) do + confine :kernel => 'GNU/kFreeBSD' + setcode do + model = Facter.value(:hardwaremodel) + case model + when 'x86_64': "amd64" + when /(i[3456]86|pentium)/: "i386" + else + model + end + end +end + -- 2.20.1