Taken from NEWS.Debian:
[mirror/dsa-puppet.git] / facts / architecture.rb
1 Facter.add(:architecture) do
2     confine :kernel => 'GNU/kFreeBSD'
3     setcode do
4         model = Facter.value(:hardwaremodel)
5         case model
6         when 'x86_64': "amd64" 
7         when /(i[3456]86|pentium)/: "i386"
8         else
9             model
10         end
11     end
12 end
13
14 Facter.add(:debarchitecture) do
15     setcode do
16         %x{/usr/bin/dpkg --print-architecture}.chomp
17     end
18 end
19