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

Version Path
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/plugins/guests/freebsd/cap/rsync.rb
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/plugins/guests/freebsd/cap/rsync.rb
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/plugins/guests/freebsd/cap/rsync.rb
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/plugins/guests/freebsd/cap/rsync.rb
vagrant-unbundled-1.8.4.2 plugins/guests/freebsd/cap/rsync.rb
vagrant-unbundled-1.8.4.1 plugins/guests/freebsd/cap/rsync.rb