synced_folders/rsync: mkdir before rsync
This commit is contained in:
parent
d4087db7c5
commit
4ef237a642
|
@ -10,6 +10,7 @@ BUG FIXES:
|
||||||
Vagrantfile.
|
Vagrantfile.
|
||||||
- commands/package: `--base` works without crashing for VirtualBox.
|
- commands/package: `--base` works without crashing for VirtualBox.
|
||||||
- guests/redhat: Fix networking issues with CentOS. [GH-3649]
|
- guests/redhat: Fix networking issues with CentOS. [GH-3649]
|
||||||
|
- synced\_folders/rsync: Create the directory before syncing.
|
||||||
|
|
||||||
## 1.6.0 (May 6, 2014)
|
## 1.6.0 (May 6, 2014)
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,12 @@ module VagrantPlugins
|
||||||
"sudo rsync"
|
"sudo rsync"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.rsync_pre(machine, opts)
|
||||||
|
machine.communicate.tap do |comm|
|
||||||
|
comm.sudo("mkdir -p '#{opts[:guestpath]}'")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def self.rsync_post(machine, opts)
|
def self.rsync_post(machine, opts)
|
||||||
machine.communicate.sudo(
|
machine.communicate.sudo(
|
||||||
"find '#{opts[:guestpath]}' '(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " +
|
"find '#{opts[:guestpath]}' '(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " +
|
||||||
|
|
|
@ -16,6 +16,12 @@ module VagrantPlugins
|
||||||
"sudo rsync"
|
"sudo rsync"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.rsync_pre(machine, opts)
|
||||||
|
machine.communicate.tap do |comm|
|
||||||
|
comm.sudo("mkdir -p '#{opts[:guestpath]}'")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def self.rsync_post(machine, opts)
|
def self.rsync_post(machine, opts)
|
||||||
machine.communicate.sudo(
|
machine.communicate.sudo(
|
||||||
"find '#{opts[:guestpath]}' '(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " +
|
"find '#{opts[:guestpath]}' '(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " +
|
||||||
|
|
|
@ -10,6 +10,12 @@ module VagrantPlugins
|
||||||
"sudo rsync"
|
"sudo rsync"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.rsync_pre(machine, opts)
|
||||||
|
machine.communicate.tap do |comm|
|
||||||
|
comm.sudo("mkdir -p '#{opts[:guestpath]}'")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def self.rsync_post(machine, opts)
|
def self.rsync_post(machine, opts)
|
||||||
machine.communicate.sudo(
|
machine.communicate.sudo(
|
||||||
"find '#{opts[:guestpath]}' '(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " +
|
"find '#{opts[:guestpath]}' '(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " +
|
||||||
|
|
|
@ -17,6 +17,12 @@ module VagrantPlugins
|
||||||
"sudo rsync"
|
"sudo rsync"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.rsync_pre(machine, opts)
|
||||||
|
machine.communicate.tap do |comm|
|
||||||
|
comm.sudo("mkdir -p '#{opts[:guestpath]}'")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def self.rsync_post(machine, opts)
|
def self.rsync_post(machine, opts)
|
||||||
machine.communicate.sudo(
|
machine.communicate.sudo(
|
||||||
"find '#{opts[:guestpath]}' '(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " +
|
"find '#{opts[:guestpath]}' '(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " +
|
||||||
|
|
|
@ -17,6 +17,12 @@ module VagrantPlugins
|
||||||
"sudo rsync"
|
"sudo rsync"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.rsync_pre(machine, opts)
|
||||||
|
machine.communicate.tap do |comm|
|
||||||
|
comm.sudo("mkdir -p '#{opts[:guestpath]}'")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def self.rsync_post(machine, opts)
|
def self.rsync_post(machine, opts)
|
||||||
machine.communicate.sudo(
|
machine.communicate.sudo(
|
||||||
"find '#{opts[:guestpath]}' '(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " +
|
"find '#{opts[:guestpath]}' '(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " +
|
||||||
|
|
|
@ -10,6 +10,12 @@ module VagrantPlugins
|
||||||
"#{machine.config.smartos.suexec_cmd} rsync"
|
"#{machine.config.smartos.suexec_cmd} rsync"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.rsync_pre(machine, opts)
|
||||||
|
machine.communicate.tap do |comm|
|
||||||
|
comm.sudo("mkdir -p '#{opts[:guestpath]}'")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def self.rsync_post(machine, opts)
|
def self.rsync_post(machine, opts)
|
||||||
machine.communicate.sudo("find '#{opts[:guestpath]}' '(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " +
|
machine.communicate.sudo("find '#{opts[:guestpath]}' '(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " +
|
||||||
"xargs -0 -r chown -v #{opts[:owner]}:#{opts[:group]}")
|
"xargs -0 -r chown -v #{opts[:owner]}:#{opts[:group]}")
|
||||||
|
|
|
@ -10,6 +10,12 @@ module VagrantPlugins
|
||||||
"#{machine.config.solaris.suexec_cmd} rsync"
|
"#{machine.config.solaris.suexec_cmd} rsync"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.rsync_pre(machine, opts)
|
||||||
|
machine.communicate.tap do |comm|
|
||||||
|
comm.sudo("mkdir -p '#{opts[:guestpath]}'")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def self.rsync_post(machine, opts)
|
def self.rsync_post(machine, opts)
|
||||||
su_cmd = machine.config.solaris.su_cmd
|
su_cmd = machine.config.solaris.su_cmd
|
||||||
machine.communicate.execute(
|
machine.communicate.execute(
|
||||||
|
|
|
@ -10,6 +10,12 @@ module VagrantPlugins
|
||||||
"#{machine.config.solaris11.suexec_cmd} rsync"
|
"#{machine.config.solaris11.suexec_cmd} rsync"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.rsync_pre(machine, opts)
|
||||||
|
machine.communicate.tap do |comm|
|
||||||
|
comm.sudo("mkdir -p '#{opts[:guestpath]}'")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def self.rsync_post(machine, opts)
|
def self.rsync_post(machine, opts)
|
||||||
su_cmd = machine.config.solaris11.su_cmd
|
su_cmd = machine.config.solaris11.su_cmd
|
||||||
machine.communicate.execute(
|
machine.communicate.execute(
|
||||||
|
|
Loading…
Reference in New Issue