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
112 113 114 115 |
# File 'lib/getch.rb', line 112 def bootloader @assembly.luks_keys @assembly.bootloader end |
#configure ⇒ Object
121 122 123 124 125 126 127 128 |
# File 'lib/getch.rb', line 121 def configure config = Getch::Config::Main.new config.ethernet config.wifi config.dns config.sysctl config.shell end |
#finalize ⇒ Object
117 118 119 |
# File 'lib/getch.rb', line 117 def finalize @assembly.finalize end |
#install_system ⇒ Object
100 101 102 103 104 105 |
# File 'lib/getch.rb', line 100 def install_system @assembly.tarball @assembly.pre_config @assembly.update @assembly.post_config end |
#prepare_disk ⇒ Object
93 94 95 96 97 98 |
# File 'lib/getch.rb', line 93 def prepare_disk @assembly.clean @assembly.partition @assembly.format @assembly.mount end |
#resume ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/getch.rb', line 65 def resume STATES[:partition] && return @log.fatal 'No disk, use at least getch with -d DISK' unless OPTIONS[:disk] puts "\nBuild " + OPTIONS[:os].capitalize + " 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 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
107 108 109 110 |
# File 'lib/getch.rb', line 107 def terraform @assembly.terraform @assembly.services end |