summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThom May <thom@may.lt>2015-06-24 17:37:39 +0100
committerThom May <thom@may.lt>2015-06-24 17:37:39 +0100
commitf7443482f90fcbdd02673990bcc38bb520a31cd3 (patch)
tree70934b38aa2465f1796e3f79fd006502e7c99a2d
parent132eef525ccf62bbd639e89d9e44094d0e13a2bc (diff)
parent2df4c08b38a00d30a588f28b3400dcf5b482e984 (diff)
downloadohai-f7443482f90fcbdd02673990bcc38bb520a31cd3.tar.gz
Merge pull request #554 from involucelate/master
Fix windows 2008 hostname truncation
-rw-r--r--lib/ohai/plugins/hostname.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ohai/plugins/hostname.rb b/lib/ohai/plugins/hostname.rb
index 447b255d..c65b7706 100644
--- a/lib/ohai/plugins/hostname.rb
+++ b/lib/ohai/plugins/hostname.rb
@@ -151,7 +151,7 @@ Ohai.plugin(:Hostname) do
wmi = WmiLite::Wmi.new
host = wmi.first_of('Win32_ComputerSystem')
- hostname "#{host['name']}"
+ hostname "#{host['dnshostname']}"
machinename "#{host['name']}"
info = Socket.gethostbyname(Socket.gethostname)