diff options
| author | Benedikt Böhm <bb@xnull.de> | 2009-05-12 08:11:46 +0100 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2009-05-13 11:29:34 +1000 |
| commit | aecac08aa3c27c8b7e1441d726a9711da7f6dff4 (patch) | |
| tree | 45fd5611649ad8046a168561879cd6b467f629cf /lib | |
| parent | 831d937a88e6de9e2e4ff8c3bfe025abfd2ac99a (diff) | |
| download | facter-aecac08aa3c27c8b7e1441d726a9711da7f6dff4.tar.gz facter-aecac08aa3c27c8b7e1441d726a9711da7f6dff4.tar.xz facter-aecac08aa3c27c8b7e1441d726a9711da7f6dff4.zip | |
Fix #2155 - architecture facts on Gentoo
This corrects the architecture results for Gentoo on x86 and amd64
Patch from redmine
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/facter/architecture.rb | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/facter/architecture.rb b/lib/facter/architecture.rb index bc9910a..44fc97f 100644 --- a/lib/facter/architecture.rb +++ b/lib/facter/architecture.rb @@ -4,9 +4,20 @@ Facter.add(:architecture) do model = Facter.value(:hardwaremodel) case model # most linuxen use "x86_64" - when 'x86_64' - Facter.value(:operatingsystem) == "Debian" ? "amd64" : model; - when /(i[3456]86|pentium)/; "i386" + when "x86_64" + case Facter.value(:operatingsystem) + when "Debian", "Gentoo" + "amd64" + else + model + end + when /(i[3456]86|pentium)/ + case Facter.value(:operatingsystem) + when "Gentoo" + "x86" + else + "i386" + end else model end |
