class Getch::FileSystem::Lvm::Format
Public Class Methods
new()
click to toggle source
Calls superclass method
Getch::FileSystem::Lvm::Device::new
# File lib/getch/filesystem/lvm/format.rb, line 5 def initialize super @state = Getch::States.new format end
Public Instance Methods
format()
click to toggle source
# File lib/getch/filesystem/lvm/format.rb, line 11 def format return if STATES[:format] exec("mkfs.fat -F32 #{@dev_esp}") if @dev_esp exec("mkfs.ext4 -F #{@dev_boot}") if @dev_boot exec("mkswap -f #{@lv_swap}") exec("mkfs.ext4 -F #{@lv_root}") exec("mkfs.ext4 -F #{@lv_home}") if @lv_home @state.format end
Private Instance Methods
exec(cmd)
click to toggle source
# File lib/getch/filesystem/lvm/format.rb, line 23 def exec(cmd) Getch::Command.new(cmd).run! end