summaryrefslogtreecommitdiffstats
path: root/lib/puppet/provider/exec/shell.rb
diff options
context:
space:
mode:
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