Class: Fstab::Root
Overview
Generating /etc/fstab
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(devs, options) ⇒ Root
constructor
A new instance of Root.
Methods included from NiTo
cp, echo, echo_a, grep?, mkdir, mount, mount?, mv, rm, search_proc_swaps, sed, sh, swapoff, swapoff_dm, touch, umount
Constructor Details
#initialize(devs, options) ⇒ Root
Returns a new instance of Root.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/fstab/root.rb', line 11 def initialize(devs, ) @log = Getch::Log.new @efi = devs[:efi] ||= nil @boot = devs[:boot] ||= nil @swap = devs[:swap] ||= nil @root = devs[:root] ||= nil @home = devs[:home] ||= nil @fs = [:fs] ||= 'ext4' @mountpoint = [:mountpoint] ||= '/mnt/getch' @conf = "#{@mountpoint}/etc/fstab" end |
Instance Method Details
#generate ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/fstab/root.rb', line 23 def generate @log.info 'Generating fstab...' write_efi write_boot write_swap write_root write_home write_tmp @log.result_ok end |