5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/danarchy_deploy/system/cryptsetup.rb', line 5
def self.new(os, cryptsetup, options)
return false if cryptsetup.nil?
puts "\n" + self.name
if os == 'gentoo'
DanarchyDeploy::Services::Init.init_manager(os, 'lvmetad', 'enable', options)
DanarchyDeploy::Services::Init.init_manager(os, 'lvmetad', 'start', options)
end
service, target, source = set_config(cryptsetup, options)
lvm_result, crypt_result = nil
cryptsetup[:volumes].each do |device, volume|
lvm_result = lvm_setup(device, volume, options)
crypt_result = encrypt_volume(volume, options)
end
deploy_template(target, source, cryptsetup[:volumes], options)
if os == 'gentoo'
DanarchyDeploy::Services::Init.init_manager(os, service, 'enable', options)
DanarchyDeploy::Services::Init.init_manager(os, service, 'start', options)
end
end
|