author | Kristina Tripp <Kristina.Tripp@oracle.com> |
Fri, 17 Oct 2014 09:32:29 -0700 | |
branch | s11-update |
changeset 3401 | bd976a0fa74e |
permissions | -rw-r--r-- |
3401
bd976a0fa74e
18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff
changeset
|
1 |
Patch for FACT-547 Limit the output of prtdiag on Solaris |
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-547 |
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/util/manufacturer.rb.orig 2014-08-14 12:58:39.037467412 -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/util/manufacturer.rb 2014-08-14 12:59:25.145156708 -0600 |
bd976a0fa74e
18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff
changeset
|
5 |
@@ -60,7 +60,7 @@ |
bd976a0fa74e
18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff
changeset
|
6 |
|
bd976a0fa74e
18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff
changeset
|
7 |
def self.prtdiag_sparc_find_system_info() |
bd976a0fa74e
18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff
changeset
|
8 |
# Parses prtdiag for a SPARC architecture string, won't work with Solaris x86 |
bd976a0fa74e
18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff
changeset
|
9 |
- output = Facter::Core::Execution.exec('/usr/sbin/prtdiag 2>/dev/null') |
bd976a0fa74e
18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff
changeset
|
10 |
+ output = Facter::Core::Execution.exec('/usr/sbin/prtdiag 2>/dev/null | /usr/bin/head') |
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 |
# System Configuration: Sun Microsystems sun4u Sun SPARC Enterprise M3000 Server |
bd976a0fa74e
18354422 facter cannot parse the output of GNU uptime
Kristina Tripp <Kristina.Tripp@oracle.com>
parents:
diff
changeset
|
13 |
if output and output =~ /^System Configuration:\s+(.+?)\s+(sun\d+\S+)\s+(.+)/ |