[Pkg-puppet-devel] [SCM] Packaging of Facter for debian branch, experimental_upstream, updated. 1.5.9-54-g5a4eeed

Adrien Thebo adrien.thebo at gmail.com
Wed Jun 22 08:51:48 UTC 2011


The following commit has been merged in the experimental_upstream branch:
commit bfc16f6bb9ffbd0064300e647481aab83b7f6212
Author: Adrien Thebo <adrien at puppetlabs.com>
Date:   Tue Mar 22 11:20:27 2011 -0700

    (#2714) Added timeout to prtdiag resulution
    
     - prtdiag would hang in specific cases, subsequently hanging facter.
       This should kill prtdiag if it takes excessively long.

diff --git a/lib/facter/virtual.rb b/lib/facter/virtual.rb
index 7c649ba..2801a43 100644
--- a/lib/facter/virtual.rb
+++ b/lib/facter/virtual.rb
@@ -119,8 +119,11 @@ Facter.add("virtual") do
                         result = "vmware" if pd =~ /VMware/
                         result = "virtualbox" if pd =~ /VirtualBox/
                     end
-                else
-                    output = Facter::Util::Resolution.exec('prtdiag')
+                elsif Facter.value(:kernel) == 'SunOS'
+                    res = Facter::Util::Resolution.new('prtdiag')
+                    res.timeout = 6
+                    res.setcode('prtdiag')
+                    output = res.value
                     if not output.nil?
                         output.each_line do |pd|
                             result = "parallels" if pd =~ /Parallels/

-- 
Packaging of Facter for debian



More information about the Pkg-puppet-devel mailing list