Class: Mkfs::Encrypt
Instance Method Summary collapse
-
#format_boot ⇒ Object
Boot is alrealy formatted.
- #format_home ⇒ Object
- #format_root ⇒ Object
-
#format_swap ⇒ Object
Swap will be encrypted after the reboot.
-
#initialize(devs, options) ⇒ Encrypt
constructor
A new instance of Encrypt.
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, ) @luks = [:luks_name] super end |
Instance Method Details
#format_boot ⇒ Object
Boot is alrealy formatted
120 121 |
# File 'lib/mkfs.rb', line 120 def format_boot end |
#format_home ⇒ Object
133 134 135 136 137 |
# File 'lib/mkfs.rb', line 133 def format_home @home || return mkfs "/dev/mapper/home-#{@luks}" end |
#format_root ⇒ Object
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_swap ⇒ Object
Swap will be encrypted after the reboot
124 125 |
# File 'lib/mkfs.rb', line 124 def format_swap end |