Class: CryptReboot::LuksCryptTabPatcher

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

Overview

Generate patch (files hash) from files in a directory containing uncompressed initramfs

Instance Method Summary collapse

Instance Method Details

#call(dir) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/crypt_reboot/luks_crypt_tab_patcher.rb', line 6

def call(dir)
  full_crypttab_path = File.join(dir, crypttab_path)
  return {} unless File.exist?(full_crypttab_path)

  crypttab_entries = crypttab_deserializer.call(full_crypttab_path)
  files_generator.call(crypttab_entries, base_dir: dir, crypttab_path: crypttab_path)
end