Merge pull request #688 from schisamo/transient-shared-folder-support
add vbox driver support for creating transient shared folders
This commit is contained in:
commit
e9ae63f3b5
|
@ -63,7 +63,8 @@ module Vagrant
|
||||||
shared_folders.each do |name, data|
|
shared_folders.each do |name, data|
|
||||||
folders << {
|
folders << {
|
||||||
:name => name,
|
:name => name,
|
||||||
:hostpath => File.expand_path(data[:hostpath], @env[:root_path])
|
:hostpath => File.expand_path(data[:hostpath], @env[:root_path]),
|
||||||
|
:transient => data[:transient]
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -79,6 +79,7 @@ Please change your configurations to match this new syntax.
|
||||||
:owner => nil,
|
:owner => nil,
|
||||||
:group => nil,
|
:group => nil,
|
||||||
:nfs => false,
|
:nfs => false,
|
||||||
|
:transient => false,
|
||||||
:extra => nil
|
:extra => nil
|
||||||
}.merge(opts || {})
|
}.merge(opts || {})
|
||||||
end
|
end
|
||||||
|
|
|
@ -392,8 +392,12 @@ module Vagrant
|
||||||
|
|
||||||
def share_folders(folders)
|
def share_folders(folders)
|
||||||
folders.each do |folder|
|
folders.each do |folder|
|
||||||
execute("sharedfolder", "add", @uuid, "--name",
|
args = ["--name",
|
||||||
folder[:name], "--hostpath", folder[:hostpath])
|
folder[:name],
|
||||||
|
"--hostpath",
|
||||||
|
folder[:hostpath]]
|
||||||
|
args << "--transient" if folder.has_key?(:transient) && folder[:transient]
|
||||||
|
execute("sharedfolder", "add", @uuid, *args)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -392,8 +392,12 @@ module Vagrant
|
||||||
|
|
||||||
def share_folders(folders)
|
def share_folders(folders)
|
||||||
folders.each do |folder|
|
folders.each do |folder|
|
||||||
execute("sharedfolder", "add", @uuid, "--name",
|
args = ["--name",
|
||||||
folder[:name], "--hostpath", folder[:hostpath])
|
folder[:name],
|
||||||
|
"--hostpath",
|
||||||
|
folder[:hostpath]]
|
||||||
|
args << "--transient" if folder.has_key?(:transient) && folder[:transient]
|
||||||
|
execute("sharedfolder", "add", @uuid, *args)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue