Merge branch 'unpriv_shell' of https://github.com/frsantos/vagrant into frsantos-unpriv_shell

Conflicts:
	plugins/provisioners/shell/config.rb
	plugins/provisioners/shell/provisioner.rb
This commit is contained in:
Mitchell Hashimoto 2013-08-28 22:29:49 -07:00
commit 349b2507f9
2 changed files with 4 additions and 1 deletions

View File

@ -5,12 +5,14 @@ module VagrantPlugins
attr_accessor :path
attr_accessor :upload_path
attr_accessor :args
attr_accessor :privileged
def initialize
@args = UNSET_VALUE
@inline = UNSET_VALUE
@path = UNSET_VALUE
@upload_path = UNSET_VALUE
@privileged = UNSET_VALUE
end
def finalize!
@ -18,6 +20,7 @@ module VagrantPlugins
@inline = nil if @inline == UNSET_VALUE
@path = nil if @path == UNSET_VALUE
@upload_path = "/tmp/vagrant-shell" if @upload_path == UNSET_VALUE
@privileged = true if @privileged == UNSET_VALUE
end
def validate(machine)

View File

@ -28,7 +28,7 @@ module VagrantPlugins
end
# Execute it with sudo
comm.sudo(command) do |type, data|
comm.execute(command, sudo: config.privileged) do |type, data|
if [:stderr, :stdout].include?(type)
# Output the data with the proper color based on the stream.
color = type == :stdout ? :green : :red