Merge pull request #4415 from sax/smartos_rsync

guests/smartos: rsync_post has find permissions on smartos
This commit is contained in:
Mitchell Hashimoto 2014-08-29 14:38:31 -07:00
commit c78b46dc7b
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ module VagrantPlugins
end
def self.rsync_post(machine, opts)
machine.communicate.execute("find '#{opts[:guestpath]}' '(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " +
machine.communicate.execute("#{machine.config.smartos.suexec_cmd} find '#{opts[:guestpath]}' '(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " +
"#{machine.config.smartos.suexec_cmd} xargs -0 chown #{opts[:owner]}:#{opts[:group]}")
end
end

View File

@ -40,7 +40,7 @@ describe "VagrantPlugins::VagrantPlugins::Cap::Rsync" do
describe ".rsync_post" do
it 'chowns incorrectly owned files in sync dir' do
communicator.expect_command("find '/sync_dir' '(' ! -user somebody -or ! -group somegroup ')' -print0 | pfexec xargs -0 chown somebody:somegroup")
communicator.expect_command("pfexec find '/sync_dir' '(' ! -user somebody -or ! -group somegroup ')' -print0 | pfexec xargs -0 chown somebody:somegroup")
plugin.rsync_post(machine, guestpath: '/sync_dir', owner: 'somebody', group: 'somegroup')
end
end