components/ruby/facter/patches/facter-02-FACT-656.patch
changeset 2068 4e371f01e40f
equal deleted inserted replaced
2067:e8c3cd17d19f 2068:4e371f01e40f
       
     1 Patch for FACT-656 facter generates error on Solaris kernel zone due to prtdiag
       
     2 Upstream bug: https://tickets.puppetlabs.com/browse/FACT-656
       
     3 --- facter-2.1.0/lib/facter/virtual.rb.orig	2014-08-18 10:37:43.330858038 -0600
       
     4 +++ facter-2.1.0/lib/facter/virtual.rb	2014-08-18 10:38:02.723874811 -0600
       
     5 @@ -67,7 +67,7 @@
       
     6    setcode do
       
     7      next "zone" if Facter::Util::Virtual.zone?
       
     8  
       
     9 -    output = Facter::Core::Execution.exec('prtdiag')
       
    10 +    output = Facter::Core::Execution.exec('/usr/sbin/prtdiag 2>/dev/null')
       
    11      if output
       
    12        lines = output.split("\n")
       
    13        next "parallels"  if lines.any? {|l| l =~ /Parallels/ }