lib/getch/assembly.rb in getch-0.5.0 vs lib/getch/assembly.rb in getch-0.7.0

- old
+ new

@@ -3,10 +3,11 @@ require 'clean' require 'nito' require 'cryptsetup' module Getch + # define steps/order for getch class Assembly include NiTo def initialize @os = Tree::Os.new.select @@ -89,37 +90,37 @@ @os::PostConfig.new @state.post_config end + # Luks_keys + # Install external keys to avoid enter password multiple times + def luks_keys + return unless OPTIONS[:encrypt] && OPTIONS[:fs] != 'zfs' + + return if STATES[:luks_keys] + + CryptSetup.new(DEVS, OPTIONS).keys + @state.luks_keys + end + # terraform # Install all the required packages # Also add services def terraform return if STATES[:terraform] - #@fs::PreDeps.new + # @fs::PreDeps.new @os::Terraform.new @fs::Deps.new @state.terraform end def services return if STATES[:services] @os::Services.new @state.services - end - - # Luks_keys - # Install external keys to avoid enter password multiple times - def luks_keys - return if not OPTIONS[:encrypt] or OPTIONS[:fs] == 'zfs' - - return if STATES[:luks_keys] - - CryptSetup.new(DEVS, OPTIONS).keys - @state.luks_keys end # bootloader # Install and configure Grub2 or Systemd-boot with Dracut # Adding keys for Luks