summaryrefslogtreecommitdiffstats
path: root/lib/puppet/provider/exec/shell.rb
diff options
context:
space:
mode:
authorMax Martin <max@puppetlabs.com>2011-03-23 14:43:29 -0700
committerMax Martin <max@puppetlabs.com>2011-03-23 14:43:29 -0700
commit4196699f5fbb90ceecbb709c8502622eaad39062 (patch)
treeadb06f307051368e9fe9a23c3338fe7511eb8adf /lib/puppet/provider/exec/shell.rb
parent7e71840e29cb09c772668a51ada3cab1e319e50f (diff)
parent66d0b16c8a0a55dd79b1b0f0e639f107e552d9ab (diff)
downloadpuppet-4196699f5fbb90ceecbb709c8502622eaad39062.tar.gz
puppet-4196699f5fbb90ceecbb709c8502622eaad39062.tar.xz
puppet-4196699f5fbb90ceecbb709c8502622eaad39062.zip
Merge branch 'next'
* next: (34 commits) (#6820) Fix File class lookup in the file type for Ruby 1.9 (#6820) Fix nagios parser to use proper hash syntax for Ruby 1.9 (#6820) Fix Invalid multibyte character (#6820) Fix RDOC parser to work with Ruby 1.9 (#6820) Fix invalid next that should be a return (#2782) Fix constant_defined? (#6527) Fix pip tests (#6527) Fix uninstall problem and refactor (#6527) Added pip package provider. maint: Change code for finding spec_helper to work with Ruby 1.9 Fix error "invalid multibyte char (US-ASCII)" under Ruby 1.9 Fixed #6562 - Minor kick documentation fix (#6566) Replace tabs with spaces (#6566) Fix ruby 1.9 incompatible case statement Fixed #6566 Replace ftools with filetuils in rake gem task (#6555) Fix another ruby 1.9 incompatible case statement Fixed #6555 - Fixed two more when then colon issues Fixed #6555 - Ruby 1.9.x returning Invalid next (SyntaxError) Fixed #6555 - Ruby 1.9.x warning: class variable access from toplevel (#6658) Propagate ENC connection errors to the agent ...
Diffstat (limited to 'lib/puppet/provider/exec/shell.rb')
-rw-r--r--lib/puppet/provider/exec/shell.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/puppet/provider/exec/shell.rb b/lib/puppet/provider/exec/shell.rb
new file mode 100644
index 000000000..98f309e8f
--- /dev/null
+++ b/lib/puppet/provider/exec/shell.rb
@@ -0,0 +1,17 @@
+Puppet::Type.type(:exec).provide :shell, :parent => :posix do
+ include Puppet::Util::Execution
+
+ confine :feature => :posix
+
+ desc "Execute external binaries directly, on POSIX systems.
+passing through a shell so that shell built ins are available."
+
+ def run(command, check = false)
+ command = %Q{/bin/sh -c "#{command.gsub(/"/,'\"')}"}
+ super(command, check)
+ end
+
+ def validatecmd(command)
+ true
+ end
+end