Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-cloud / recipes-support / facter / files / 0003-centos_remove-net-commands-that-can-timeout.patch
1 ---
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(-)
5
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
11  
12 -    hostname_command = if Facter.value(:kernel) =~ can_do_hostname_f
13 -                         full_hostname
14 -                       elsif Facter.value(:kernel) == "windows"
15 -                         windows_hostname
16 -                       else
17 -                         basic_hostname
18 -                       end
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
21 +    #                      full_hostname
22 +    #                   elsif Facter.value(:kernel) == "windows"
23 +    #                     windows_hostname
24 +    #                   else
25 +    #                     basic_hostname
26 +    #                   end
27 +    hostname_command = basic_hostname
28  
29      if name = Facter::Core::Execution.exec(hostname_command) \
30        and name =~ /.*?\.(.+$)/
31  
32        return_value = $1
33 -    elsif Facter.value(:kernel) != "windows" and domain = Facter::Core::Execution.exec('dnsdomainname 2> /dev/null') \
34 -      and domain =~ /.+/
35 -
36 -      return_value = domain
37 +    # elsif Facter.value(:kernel) != "windows" and domain = Facter::Core::Execution.exec('dnsdomainname 2> /dev/null') \
38 +    #  and domain =~ /.+/
39 +    #
40 +    #  return_value = domain
41      elsif FileTest.exists?("/etc/resolv.conf")
42        domain = nil
43        search = nil
44 --- a/facter-2.4.4/lib/facter/uniqueid.rb
45 +++ b/facter-2.4.4/lib/facter/uniqueid.rb
46 @@ -1,4 +1,5 @@
47 -Facter.add(:uniqueid) do
48 -  setcode 'hostid'
49 -  confine :kernel => %w{SunOS Linux AIX GNU/kFreeBSD}
50 -end
51 +# hostid does not work with IPv6, and is not needed for Titanium cloud, so remove
52 +# Facter.add(:uniqueid) do
53 +#   setcode 'hostid'
54 +#   confine :kernel => %w{SunOS Linux AIX GNU/kFreeBSD}
55 +# end