Sha256: 7c1bd7fea30b10d82873cfff04ded962dd4595579f0d1d6c467db0339d9618b6
Contents?: true
Size: 885 Bytes
Versions: 3
Compression:
Stored size: 885 Bytes
Contents
# frozen_string_literal: true module Dracut # configure dracut for encypted system class Encrypt < Root def initialize(devs, options) @luks = options[:luks_name] super end def generate host_only cmdline luks_key end protected def get_line root = Getch::Helpers.uuid @root dm_root = get_dm_uuid "root-#{@luks}" "rd.luks.uuid=#{root} root=UUID=#{dm_root} rootfstype=#{@fs}" end def luks_key file = "#{@mountpoint}/etc/dracut.conf.d/luks_key.conf" echo file, 'install_items+=" /boot/boot.key /boot/root.key /etc/crypttab "' end def others file = "#{@mountpoint}/etc/dracut.conf.d/mods.conf" echo file, 'add_dracutmodules+=" crypt "' end private def get_dm_uuid(name) dm = Getch::Helpers.get_dm name Getch::Helpers.uuid dm end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
getch-0.11.0 | lib/dracut/encrypt.rb |
getch-0.7.3 | lib/dracut/encrypt.rb |
getch-0.7.0 | lib/dracut/encrypt.rb |