projects
/
mirror
/
dsa-puppet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad50a77
)
Add architecture test for FreeBSD boxen. Lets see how much this breaks
author
Stephen Gran
<steve@lobefin.net>
Sun, 4 Oct 2009 21:10:06 +0000
(22:10 +0100)
committer
Stephen Gran
<steve@lobefin.net>
Sun, 4 Oct 2009 21:10:06 +0000
(22:10 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
facts/architecture.rb
[new file with mode: 0644]
patch
|
blob
diff --git a/facts/architecture.rb
b/facts/architecture.rb
new file mode 100644
(file)
index 0000000..
d6187b2
--- /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
+