Module: CloudFlock::App::Common::Cleanup::Unix

Extended by:
Unix
Included in:
Unix
Defined in:
lib/cloudflock/app/common/cleanup/unix.rb

Overview

Public: The Unix module provides cleanup steps which are appropriate for all Unix-like hosts.

Instance Method Summary collapse

Instance Method Details

#unix_cleanupObject

Public: Define pre-, during-, and post-chroot steps which will be applicable to all Unix-like hosts.

Returns nothing.



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/cloudflock/app/common/cleanup/unix.rb', line 11

def unix_cleanup
  pre_step 'mount proc -t proc /mnt/migration_target/proc'
  pre_step 'mount /dev /mnt/migration_target/dev -o rbind'
  pre_step 'mount /sys /mnt/migration_target/sys -o rbind'

  chroot_step 'find /var/run -type f -exec rm {} \;'

  post_step 'umount /mnt/migration_target/sys'
  post_step 'umount /mnt/migration_target/dev'
  post_step 'umount /mnt/migration_target/proc'
end