Class: CryptSetup

Inherits:
Object
  • Object
show all
Defined in:
lib/cryptsetup.rb

Instance Method Summary collapse

Constructor Details

#initialize(devs, options) ⇒ CryptSetup

Returns a new instance of CryptSetup.



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/cryptsetup.rb', line 4

def initialize(devs, options)
  @boot = devs[:boot]
  @root = devs[:root]
  @home = devs[:home]
  @swap = devs[:swap] ||= nil
  @options = options
  @luks = options[:luks_name]
  @vg = options[:vg_name]
  @fs = options[:fs] ||= 'ext4'
  @mountpoint = options[:mountpoint] ||= '/mnt/getch'
end

Instance Method Details

#configsObject



28
29
30
31
32
33
# File 'lib/cryptsetup.rb', line 28

def configs
  config_boot
  config_root
  config_home
  config_swap
end

#formatObject



16
17
18
19
20
# File 'lib/cryptsetup.rb', line 16

def format
  format_boot
  format_root
  format_home
end

#keysObject



22
23
24
25
26
# File 'lib/cryptsetup.rb', line 22

def keys
  add_boot_key
  add_root_key
  add_home_key
end

#swap_confObject



35
36
37
# File 'lib/cryptsetup.rb', line 35

def swap_conf
  config_swap
end