# File lib/ohai/plugins/hostname.rb, line 48 def resolve_fqdn begin hostname = from_cmd("hostname") addrinfo = Socket.getaddrinfo(hostname, nil).first iaddr = IPAddr.new(addrinfo[3]) Socket.gethostbyaddr(iaddr.hton)[0] rescue nil end end