[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/0.24.6-1-356-g5718585

James Turnbull james at lovedthanlost.net
Fri Jan 23 14:21:54 UTC 2009


The following commit has been merged in the master branch:
commit 7de82c387b29b0c9202e35d680f109407c07faa7
Author: Nigel Kersten <nigelk at google.com>
Date:   Thu Dec 4 10:26:00 2008 -0800

    add support for stdin to Puppet::Util.execute

diff --git a/lib/puppet/util.rb b/lib/puppet/util.rb
index 09c94c3..b07b2df 100644
--- a/lib/puppet/util.rb
+++ b/lib/puppet/util.rb
@@ -268,7 +268,7 @@ module Util
 
     # Execute the desired command, and return the status and output.
     # def execute(command, failonfail = true, uid = nil, gid = nil)
-    def execute(command, arguments = {:failonfail => true, :combine => true})
+    def execute(command, arguments = {:failonfail => true, :combine => true, :stdin => "/dev/null"})
         if command.is_a?(Array)
             command = command.flatten.collect { |i| i.to_s }
             str = command.join(" ")
@@ -321,7 +321,7 @@ module Util
             # Child process executes this
             Process.setsid
             begin
-                $stdin.reopen("/dev/null")
+                $stdin.reopen(arguments[:stdin])
                 $stdout.reopen(output_file)
                 $stderr.reopen(error_file)
 

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list