add vbox driver support for creating transient shared folders

This commit is contained in:
Seth Chisamore 2012-01-27 09:58:54 -08:00
parent e1dbc7f9b1
commit 14c4dc5d53
4 changed files with 15 additions and 5 deletions

View File

@ -63,7 +63,8 @@ module Vagrant
shared_folders.each do |name, data|
folders << {
:name => name,
:hostpath => File.expand_path(data[:hostpath], @env[:root_path])
:hostpath => File.expand_path(data[:hostpath], @env[:root_path]),
:transient => data[:transient]
}
end

View File

@ -79,6 +79,7 @@ Please change your configurations to match this new syntax.
:owner => nil,
:group => nil,
:nfs => false,
:transient => false,
:extra => nil
}.merge(opts || {})
end

View File

@ -392,8 +392,12 @@ module Vagrant
def share_folders(folders)
folders.each do |folder|
execute("sharedfolder", "add", @uuid, "--name",
folder[:name], "--hostpath", folder[:hostpath])
args = ["--name",
folder[:name],
"--hostpath",
folder[:hostpath]]
args << "--transient" if folder.has_key?(:transient) && folder[:transient]
execute("sharedfolder", "add", @uuid, *args)
end
end

View File

@ -392,8 +392,12 @@ module Vagrant
def share_folders(folders)
folders.each do |folder|
execute("sharedfolder", "add", @uuid, "--name",
folder[:name], "--hostpath", folder[:hostpath])
args = ["--name",
folder[:name],
"--hostpath",
folder[:hostpath]]
args << "--transient" if folder.has_key?(:transient) && folder[:transient]
execute("sharedfolder", "add", @uuid, *args)
end
end