Class: Clean

Inherits:
Object
  • Object
show all
Includes:
NiTo
Defined in:
lib/clean.rb

Instance Method Summary collapse

Methods included from NiTo

cp, echo, echo_a, grep?, mkdir, mount, mount?, mv, rm, search_proc_swaps, sed, sh, swapoff, swapoff_dm, touch, umount

Constructor Details

#initialize(args) ⇒ Clean

Returns a new instance of Clean.



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/clean.rb', line 10

def initialize(args)
  @root = args[:disk] ||= nil
  @boot = args[:boot_disk] ||= nil
  @home = args[:home_disk] ||= nil
  @cache = args[:cache_disk] ||= nil
  @vg = args[:vg_name] ||= nil
  @luks = args[:luks_name] ||= nil
  @zfs = args[:zfs_name] ||= 'pool'
  @log = Getch::Log.new
  @mountpoint = args[:mountpoint] ||= '/mnt/getch'
end

Instance Method Details

#xObject



22
23
24
25
26
27
28
29
30
31
32
# File 'lib/clean.rb', line 22

def x
  umount_all
  swap_off
  disable_lvs
  cryptsetup_close
  old_zfs
  old_lvm
  zap_all @root, @boot, @home, @cache
  wipe_all @root, @boot, @home, @cache
  dd
end