Class: CryptReboot::CryptTab::ZfsKeystoreEntriesGenerator

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

Overview

Get a list of keystore zvols from a running system and return entries array

Instance Method Summary collapse

Instance Method Details

#callObject



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

def call
  glob = File.join(zvol_dir, '**/*')
  Dir.glob(glob)
     .select { |path| path =~ %r{/keystore$} && exist?(path) }
     .map { |path| generate_entry(path) }
end