summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jacob <adam@hjksolutions.com>2009-02-26 12:10:56 -0800
committerAdam Jacob <adam@hjksolutions.com>2009-02-26 12:10:56 -0800
commit7b0f3ff1db3bc139c1f6ac67e11166c57f05a6d5 (patch)
tree6c42c6290fc2d43871cbf63db1727fb5dd478426
parent833fa32daacbcddd4f307cf5882b2b78ff25f0e8 (diff)
parent0837aad0a19464da8285e176d87de9f7a0c92890 (diff)
downloadohai-7b0f3ff1db3bc139c1f6ac67e11166c57f05a6d5.tar.gz
Merge branch 'master' into kisoku/OHAI-61
-rw-r--r--lib/ohai/plugins/darwin/kernel.rb4
-rw-r--r--lib/ohai/plugins/os.rb2
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/ohai/plugins/darwin/kernel.rb b/lib/ohai/plugins/darwin/kernel.rb
index 452ac987..0257dd17 100644
--- a/lib/ohai/plugins/darwin/kernel.rb
+++ b/lib/ohai/plugins/darwin/kernel.rb
@@ -18,6 +18,10 @@
kernel[:os] = kernel[:name]
+if from("sysctl -n hw.optional.x86_64").to_i == 1
+ kernel[:machine] = 'x86_64'
+end
+
kext = Mash.new
popen4("/usr/sbin/kextstat -k -l") do |pid, stdin, stdout, stderr|
stdin.close
diff --git a/lib/ohai/plugins/os.rb b/lib/ohai/plugins/os.rb
index a3879abe..114f75d2 100644
--- a/lib/ohai/plugins/os.rb
+++ b/lib/ohai/plugins/os.rb
@@ -25,7 +25,7 @@ when /darwin(.+)$/
when /linux/
os "linux"
when /freebsd(.+)$/
- os "freebsd"
+ os "freebsd"
else
os languages[:ruby][:host_os]
end