Sha256: b8039434f814b3f90354747036b6992c703589076ca6bb0e25147cbeb50657b7
Contents?: true
Size: 920 Bytes
Versions: 6
Compression:
Stored size: 920 Bytes
Contents
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) machine.communicate.tap do |comm| comm.sudo("mkdir -p '#{opts[:guestpath]}'") end end def self.rsync_post(machine, opts) if opts.key?(:chown) && !opts[:chown] return end machine.communicate.sudo( "find '#{opts[:guestpath]}' '(' ! -user #{opts[:owner]} -or ! -group #{opts[:group]} ')' -print0 | " + "xargs -0 -r chown #{opts[:owner]}:#{opts[:group]}") end end end end end
Version data entries
6 entries across 6 versions & 2 rubygems