author | Kristina Tripp <Kristina.Tripp@oracle.com> |
Thu, 04 Sep 2014 16:55:58 -0600 | |
changeset 2068 | 4e371f01e40f |
permissions | -rw-r--r-- |
2068
4e371f01e40f
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 |
4e371f01e40f
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 |
4e371f01e40f
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 |
4e371f01e40f
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 |
4e371f01e40f
18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff
changeset
|
5 |
@@ -1,4 +1,6 @@ |
4e371f01e40f
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') |
4e371f01e40f
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 |
4e371f01e40f
18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff
changeset
|
8 |
+ Facter.value(:hardwareisa) == 'sparc' and |
4e371f01e40f
18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff
changeset
|
9 |
+ Facter::Core::Execution.which('virtinfo') |
4e371f01e40f
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') |
4e371f01e40f
18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff
changeset
|
11 |
|
4e371f01e40f
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. |