Class: Getch::Main
- Inherits:
-
Object
- Object
- Getch::Main
- Defined in:
- lib/getch.rb
Instance Method Summary collapse
- #bootloader ⇒ Object
- #configure ⇒ Object
- #finalize ⇒ Object
-
#initialize(argv) ⇒ Main
constructor
A new instance of Main.
- #install_system ⇒ Object
- #prepare_disk ⇒ Object
- #resume ⇒ Object
- #terraform ⇒ Object
Constructor Details
Instance Method Details
#bootloader ⇒ Object
117 118 119 120 |
# File 'lib/getch.rb', line 117 def bootloader @assembly.luks_keys @assembly.bootloader end |
#configure ⇒ Object
126 127 128 129 130 131 132 133 |
# File 'lib/getch.rb', line 126 def configure config = Getch::Config::Main.new config.ethernet config.wifi config.dns config.sysctl config.shell end |
#finalize ⇒ Object
122 123 124 |
# File 'lib/getch.rb', line 122 def finalize @assembly.finalize end |
#install_system ⇒ Object
105 106 107 108 109 110 |
# File 'lib/getch.rb', line 105 def install_system @assembly.tarball @assembly.pre_config @assembly.update @assembly.post_config end |
#prepare_disk ⇒ Object
98 99 100 101 102 103 |
# File 'lib/getch.rb', line 98 def prepare_disk @assembly.clean @assembly.partition @assembly.format @assembly.mount end |
#resume ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/getch.rb', line 68 def resume STATES[:partition] && return @log.fatal 'No disk, use at least getch with -d DISK' unless OPTIONS[:disk] os_cap = OPTIONS[:os].capitalize puts "\nBuild #{os_cap} Linux with the following args:\n" puts puts "\tLang: #{OPTIONS[:language]}" puts "\tTimezone: #{OPTIONS[:timezone]}" puts "\tKeymap: #{OPTIONS[:keymap]}" puts "\tDisk: #{OPTIONS[:disk]}" puts "\tFilesystem: #{OPTIONS[:fs]}" puts "\tUsername: #{OPTIONS[:username]}" puts "\tEncrypt: #{OPTIONS[:encrypt]}" puts "\tMusl: #{OPTIONS[:musl]}" puts "\tBinary mode: #{OPTIONS[:binary]}" puts puts "\tseparate-boot disk: #{OPTIONS[:boot_disk]}" puts "\tseparate-cache disk: #{OPTIONS[:cache_disk]}" puts "\tseparate-home disk: #{OPTIONS[:home_disk]}" puts print 'Continue? (y,N) ' case gets.chomp when /^y|^Y/ else exit end end |
#terraform ⇒ Object
112 113 114 115 |
# File 'lib/getch.rb', line 112 def terraform @assembly.terraform @assembly.services end |