Method: CloudFlock::App::Common#setup_source

Defined in:
lib/cloudflock/app/common/servers.rb

#setup_source(shell, exclusions) ⇒ Object

Public: Prepare the source host for migration by populating the exclusions list in the file located at EXCLUSIONS and determining the location of rsync on the system.

shell - SSH object logged in to the source host. exclusions - String containing the exclusions list for the source host.

Returns a String containing path to rsync on the host if present.



402
403
404
405
# File 'lib/cloudflock/app/common/servers.rb', line 402

def setup_source(shell, exclusions)
  shell.as_root("cat <<EOF> #{EXCLUSIONS}\n#{exclusions}\nEOF")
  shell.as_root('which rsync 2>/dev/null')
end