components/ruby/facter/patches/facter-01-FACT-654.patch
author Kristina Tripp <Kristina.Tripp@oracle.com>
Fri, 17 Oct 2014 09:32:29 -0700
branchs11-update
changeset 3401 bd976a0fa74e
permissions -rw-r--r--
18354422 facter cannot parse the output of GNU uptime 18960283 problem in UTILITY/PUPPET 18960296 Update Facter to 2.1.0 19357281 facter --help doesn't work 19402424 puppet error when no swap devices configured 19646677 facter-19 package not installed if ruby-19 not installed 19596952 Update facter 2.1.0 license 17797881 Add facter support for ldoms
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3401
bd976a0fa74e 18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
     1
Patch for FACT-654 facter ldom.rb generates virtinfo usage error on Solaris 11.2 x86
bd976a0fa74e 18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
     2
Upstream bug: https://tickets.puppetlabs.com/browse/FACT-654
bd976a0fa74e 18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
     3
--- facter-2.1.0/lib/facter/ldom.rb.orig	2014-08-13 17:15:34.284330702 -0600
bd976a0fa74e 18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
     4
+++ facter-2.1.0/lib/facter/ldom.rb	2014-08-13 17:16:13.476092829 -0600
bd976a0fa74e 18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
     5
@@ -1,4 +1,6 @@
bd976a0fa74e 18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
     6
-if Facter.value(:kernel) == 'SunOS' and Facter::Core::Execution.which('virtinfo')
bd976a0fa74e 18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
     7
+if Facter.value(:kernel) == 'SunOS' and
bd976a0fa74e 18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
     8
+    Facter.value(:hardwareisa) == 'sparc' and
bd976a0fa74e 18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
     9
+    Facter::Core::Execution.which('virtinfo')
bd976a0fa74e 18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    10
   virtinfo = Facter::Core::Execution.exec('virtinfo -ap')
bd976a0fa74e 18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    11
 
bd976a0fa74e 18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff changeset
    12
   # Convert virtinfo parseable output format to array of arrays.