Sha256: a52408285bb04d9828bec5bd622c641696fecac5397b0cfa0776d84a4e4b529b
Contents?: true
Size: 1000 Bytes
Versions: 2
Compression:
Stored size: 1000 Bytes
Contents
require "shellwords" module VagrantPlugins module GuestFreeBSD module Cap class RSync def self.rsync_install(machine) machine.communicate.sudo("pkg install -y rsync") end def self.rsync_installed(machine) machine.communicate.test("which rsync") end def self.rsync_command(machine) "sudo rsync" end def self.rsync_pre(machine, opts) guest_path = Shellwords.escape(opts[:guestpath]) machine.communicate.sudo("mkdir -p #{guest_path}") end def self.rsync_post(machine, opts) if opts.key?(:chown) && !opts[:chown] return end guest_path = Shellwords.escape(opts[:guestpath]) machine.communicate.sudo( "find #{guest_path} '(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " + "xargs -0 -r chown #{opts[:owner]}:#{opts[:group]}") end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vagrant-unbundled-1.8.5.2 | plugins/guests/freebsd/cap/rsync.rb |
vagrant-unbundled-1.8.5.1 | plugins/guests/freebsd/cap/rsync.rb |