Sha256: f5ab52b9894bf73da15d318c30bf45d1fcf690a647048d0ea822f3a26878b4e0

Contents?: true

Size: 802 Bytes

Versions: 24

Compression:

Stored size: 802 Bytes

Contents

Puppet::Type.type(:exec).provide :shell, :parent => :posix do
  include Puppet::Util::Execution

  confine :feature => :posix

  desc <<-EOT
    Passes the provided command through `/bin/sh`; only available on
    POSIX systems. This allows the use of shell globbing and built-ins, and
    does not require that the path to a command be fully-qualified. Although
    this can be more convenient than the `posix` provider, it also means that
    you need to be more careful with escaping; as ever, with great power comes
    etc. etc.

    This provider closely resembles the behavior of the `exec` type
    in Puppet 0.25.x.
  EOT

  def run(command, check = false)
    command = %Q{/bin/sh -c "#{command.gsub(/"/,'\"')}"}
    super(command, check)
  end

  def validatecmd(command)
    true
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
puppet-2.6.18 lib/puppet/provider/exec/shell.rb
supply_drop-0.11.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/exec/shell.rb
supply_drop-0.10.2 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/exec/shell.rb
puppet-2.6.17 lib/puppet/provider/exec/shell.rb
supply_drop-0.10.1 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/exec/shell.rb
supply_drop-0.10.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/exec/shell.rb
puppet-2.6.16 lib/puppet/provider/exec/shell.rb
puppet-2.7.13 lib/puppet/provider/exec/shell.rb
puppet-2.6.15 lib/puppet/provider/exec/shell.rb
supply_drop-0.9.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/exec/shell.rb
supply_drop-0.8.1 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/exec/shell.rb
supply_drop-0.8.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/exec/shell.rb
puppet-2.7.12 lib/puppet/provider/exec/shell.rb
puppet-2.7.11 lib/puppet/provider/exec/shell.rb
puppet-2.6.14 lib/puppet/provider/exec/shell.rb
supply_drop-0.7.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/exec/shell.rb
supply_drop-0.6.1 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/exec/shell.rb
supply_drop-0.6.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/exec/shell.rb
puppet-2.6.13 lib/puppet/provider/exec/shell.rb
puppet-2.7.9 lib/puppet/provider/exec/shell.rb