Merge pull request #688 from schisamo/transient-shared-folder-support

add vbox driver support for creating transient shared folders
This commit is contained in:
Mitchell Hashimoto 2012-01-28 16:50:27 -08:00
commit e9ae63f3b5
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