Sha256: aebacf48b82b0238b0ec2095dcc1ebbddce111dbe3b8058f9a0b8109667b91b2

Contents?: true

Size: 532 Bytes

Versions: 31

Compression:

Stored size: 532 Bytes

Contents

module Veewee
  module Provider
    module Core
      module BoxCommand

        def sudo(scriptname)
          if definition.ssh_user=="root"
            return "#{scriptname}"
          else
            command=definition.sudo_cmd
            newcommand=command.gsub(/%p/,"#{definition.ssh_password}")
            newcommand.gsub!(/%u/,"#{definition.ssh_user}")
            newcommand.gsub!(/%f/,"#{scriptname}")
            return newcommand
          end
        end

      end #Module
    end #Module
  end #Module
end #Module

Version data entries

31 entries across 31 versions & 2 rubygems

Version Path
veewee-0.5.0.alpha4 lib/veewee/provider/core/box/sudo.rb
veewee-0.5.0.alpha3 lib/veewee/provider/core/box/sudo.rb
veewee-0.5.0.alpha2 lib/veewee/provider/core/box/sudo.rb
veewee-0.5.0.alpha1 lib/veewee/provider/core/box/sudo.rb
veewee-0.4.5.1 lib/veewee/provider/core/box/sudo.rb
veewee-0.4.5 lib/veewee/provider/core/box/sudo.rb
veewee-0.4.5.pre1 lib/veewee/provider/core/box/sudo.rb
veewee-0.4.4 lib/veewee/provider/core/box/sudo.rb
veewee-0.4.3 lib/veewee/provider/core/box/sudo.rb
veewee-0.4.2 lib/veewee/provider/core/box/sudo.rb
veewee-0.4.1 lib/veewee/provider/core/box/sudo.rb
veewee-0.4.0 lib/veewee/provider/core/box/sudo.rb
veewee-0.3.12 lib/veewee/provider/core/box/sudo.rb
veewee-0.3.11 lib/veewee/provider/core/box/sudo.rb
veewee-0.3.10 lib/veewee/provider/core/box/sudo.rb
veewee-0.3.9 lib/veewee/provider/core/box/sudo.rb
veewee-atlassian-0.3.11 lib/veewee/provider/core/box/sudo.rb
veewee-0.3.7 lib/veewee/provider/core/box/sudo.rb
veewee-0.3.6 lib/veewee/provider/core/box/sudo.rb
veewee-0.3.5 lib/veewee/provider/core/box/sudo.rb