2 facter-2.4.4/lib/facter/domain.rb | 24 +++++++++++++-----------
3 facter-2.4.4/lib/facter/uniqueid.rb | 9 +++++----
4 2 files changed, 18 insertions(+), 15 deletions(-)
6 --- a/facter-2.4.4/lib/facter/domain.rb
7 +++ b/facter-2.4.4/lib/facter/domain.rb
8 @@ -33,22 +33,24 @@ Facter.add(:domain) do
9 full_hostname = 'hostname -f 2> /dev/null'
10 can_do_hostname_f = Regexp.union /Linux/i, /FreeBSD/i, /Darwin/i
12 - hostname_command = if Facter.value(:kernel) =~ can_do_hostname_f
14 - elsif Facter.value(:kernel) == "windows"
19 + # Because hostname -f doesn't work for IPv6, don't use that flag
20 + # hostname_command = if Facter.value(:kernel) =~ can_do_hostname_f
22 + # elsif Facter.value(:kernel) == "windows"
27 + hostname_command = basic_hostname
29 if name = Facter::Core::Execution.exec(hostname_command) \
30 and name =~ /.*?\.(.+$)/
33 - elsif Facter.value(:kernel) != "windows" and domain = Facter::Core::Execution.exec('dnsdomainname 2> /dev/null') \
36 - return_value = domain
37 + # elsif Facter.value(:kernel) != "windows" and domain = Facter::Core::Execution.exec('dnsdomainname 2> /dev/null') \
38 + # and domain =~ /.+/
40 + # return_value = domain
41 elsif FileTest.exists?("/etc/resolv.conf")
44 --- a/facter-2.4.4/lib/facter/uniqueid.rb
45 +++ b/facter-2.4.4/lib/facter/uniqueid.rb
47 -Facter.add(:uniqueid) do
49 - confine :kernel => %w{SunOS Linux AIX GNU/kFreeBSD}
51 +# hostid does not work with IPv6, and is not needed for Titanium cloud, so remove
52 +# Facter.add(:uniqueid) do
54 +# confine :kernel => %w{SunOS Linux AIX GNU/kFreeBSD}