Sha256: ab3520ad1d34ec83f0416d40ca42058a1c246d5c9d5e47879b71a71804bae0d2

Contents?: true

Size: 655 Bytes

Versions: 1

Compression:

Stored size: 655 Bytes

Contents

module Getch
  module FileSystem
    module Ext4
      module Encrypt
        class Format < Getch::FileSystem::Ext4::Encrypt::Device
          def initialize
            super
            @state = Getch::States.new()
            format
          end

          def format
            return if STATES[:format]
            exec("mkfs.fat -F32 #{@dev_esp}") if @dev_esp
            exec("mkfs.ext4 -F #{@luks_root}")
            exec("mkfs.ext4 -F #{@luks_home}") if @dev_home
            @state.format
          end

          private

          def exec(cmd)
            Getch::Command.new(cmd).run!
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
getch-0.1.6 lib/getch/filesystem/ext4/encrypt/format.rb