Class: Mkfs::Encrypt

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

Instance Method Summary collapse

Constructor Details

#initialize(devs, options) ⇒ Encrypt

Returns a new instance of Encrypt.



114
115
116
117
# File 'lib/mkfs.rb', line 114

def initialize(devs, options)
  @luks = options[:luks_name]
  super
end

Instance Method Details

#format_bootObject

Boot is alrealy formatted



120
121
# File 'lib/mkfs.rb', line 120

def format_boot
end

#format_homeObject



133
134
135
136
137
# File 'lib/mkfs.rb', line 133

def format_home
  @home || return

  mkfs "/dev/mapper/home-#{@luks}"
end

#format_rootObject



127
128
129
130
131
# File 'lib/mkfs.rb', line 127

def format_root
  File.exist? "/dev/mapper/root-#{@luks}" || abort("No root-#{@luks} found")

  mkfs "/dev/mapper/root-#{@luks}"
end

#format_swapObject

Swap will be encrypted after the reboot



124
125
# File 'lib/mkfs.rb', line 124

def format_swap
end