getch 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/README.md +64 -24
  5. data/assets/network-stack.conf +63 -0
  6. data/bin/getch +12 -4
  7. data/lib/getch.rb +113 -78
  8. data/lib/getch/command.rb +1 -1
  9. data/lib/getch/config.rb +33 -49
  10. data/lib/getch/config/gentoo.rb +59 -0
  11. data/lib/getch/config/void.rb +49 -0
  12. data/lib/getch/filesystem/.mount.rb.swp +0 -0
  13. data/lib/getch/filesystem/device.rb +5 -5
  14. data/lib/getch/filesystem/ext4.rb +1 -0
  15. data/lib/getch/filesystem/ext4/encrypt.rb +1 -0
  16. data/lib/getch/filesystem/ext4/encrypt/config.rb +2 -2
  17. data/lib/getch/filesystem/ext4/encrypt/format.rb +0 -1
  18. data/lib/getch/filesystem/ext4/encrypt/mount.rb +0 -1
  19. data/lib/getch/filesystem/ext4/encrypt/partition.rb +10 -16
  20. data/lib/getch/filesystem/ext4/encrypt/void.rb +100 -0
  21. data/lib/getch/filesystem/ext4/format.rb +1 -1
  22. data/lib/getch/filesystem/ext4/void.rb +43 -0
  23. data/lib/getch/filesystem/lvm.rb +1 -0
  24. data/lib/getch/filesystem/lvm/encrypt.rb +1 -0
  25. data/lib/getch/filesystem/lvm/encrypt/config.rb +2 -2
  26. data/lib/getch/filesystem/lvm/encrypt/format.rb +1 -2
  27. data/lib/getch/filesystem/lvm/encrypt/mount.rb +1 -2
  28. data/lib/getch/filesystem/lvm/encrypt/partition.rb +10 -7
  29. data/lib/getch/filesystem/lvm/encrypt/void.rb +100 -0
  30. data/lib/getch/filesystem/lvm/format.rb +1 -1
  31. data/lib/getch/filesystem/lvm/void.rb +45 -0
  32. data/lib/getch/filesystem/partition.rb +4 -4
  33. data/lib/getch/filesystem/zfs.rb +1 -0
  34. data/lib/getch/filesystem/zfs/config.rb +3 -3
  35. data/lib/getch/filesystem/zfs/deps.rb +11 -4
  36. data/lib/getch/filesystem/zfs/device.rb +6 -0
  37. data/lib/getch/filesystem/zfs/encrypt.rb +1 -0
  38. data/lib/getch/filesystem/zfs/encrypt/.mount.rb.swp +0 -0
  39. data/lib/getch/filesystem/zfs/encrypt/config.rb +5 -5
  40. data/lib/getch/filesystem/zfs/encrypt/deps.rb +11 -4
  41. data/lib/getch/filesystem/zfs/encrypt/device.rb +6 -0
  42. data/lib/getch/filesystem/zfs/encrypt/format.rb +9 -10
  43. data/lib/getch/filesystem/zfs/encrypt/mount.rb +5 -9
  44. data/lib/getch/filesystem/zfs/encrypt/partition.rb +3 -1
  45. data/lib/getch/filesystem/zfs/encrypt/void.rb +96 -0
  46. data/lib/getch/filesystem/zfs/format.rb +9 -9
  47. data/lib/getch/filesystem/zfs/mount.rb +5 -8
  48. data/lib/getch/filesystem/zfs/partition.rb +2 -1
  49. data/lib/getch/filesystem/zfs/void.rb +81 -0
  50. data/lib/getch/gentoo.rb +12 -15
  51. data/lib/getch/gentoo/boot.rb +7 -4
  52. data/lib/getch/gentoo/config.rb +8 -8
  53. data/lib/getch/gentoo/sources.rb +6 -3
  54. data/lib/getch/gentoo/stage.rb +0 -1
  55. data/lib/getch/gentoo/use_flag.rb +6 -7
  56. data/lib/getch/guard.rb +3 -1
  57. data/lib/getch/helpers.rb +107 -1
  58. data/lib/getch/log.rb +3 -2
  59. data/lib/getch/options.rb +41 -34
  60. data/lib/getch/version.rb +1 -1
  61. data/lib/getch/void.rb +59 -0
  62. data/lib/getch/void/boot.rb +80 -0
  63. data/lib/getch/void/chroot.rb +55 -0
  64. data/lib/getch/void/config.rb +87 -0
  65. data/lib/getch/void/stage.rb +70 -0
  66. metadata +22 -9
  67. metadata.gz.sig +0 -0
  68. data/.gitignore +0 -2
  69. data/CHANGELOG.md +0 -99
  70. data/Rakefile +0 -21
  71. data/bin/setup.sh +0 -90
  72. data/getch.gemspec +0 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb3fc628a7308969d14505c6f56623c11c5adda014841e162b264f189b5ad54c
4
- data.tar.gz: ea50a6890b8c0c718ec38876809144fab98442daeddad2db85bc591a77996948
3
+ metadata.gz: 9291f8df276b462cd310f6dc759d6c0526a9d8fdc7c47116f4c22e53d1aec6e6
4
+ data.tar.gz: c7c325c4fbc228110630b98f9d52d110bdc7d5654566efb0a136bbcfedbe5331
5
5
  SHA512:
6
- metadata.gz: 2395983c7fc521cc7867cdd54550177a2ed3f5eccdcd070f36eec256e73d06b8bfe961dc3f922fa9c5afac30d28e898625b32655ee89d45bc8e1da79dbf54d15
7
- data.tar.gz: 1e8eeda1ff45f0d633820ced177fb6ae97645d5aa2e7f02e69279f0b9e611035269c23707f6677820886c92122a27e92d3906401a873fc60a1e1e9064c8de3bf
6
+ metadata.gz: f7634afba44f36e31c1ab56bc373afbf1b20cce50d97445410ffc496d4c803b3c5d978c98d1a0949dc41de725db25236185df5492a0c9115425a4dc08d1c73e8
7
+ data.tar.gz: d807dbcdf3fc769473c5c14200ad91c3e8c878f6f6627a0a242481601be05e57ffe58d623c1e0431b510546f896e7fdb0f0c98bd719298977cef15ad50a76c65
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -1,34 +1,46 @@
1
1
  # Getch
2
- A CLI tool to install Gentoo.
2
+ A CLI tool to install Gentoo or Void Linux with default:
3
+ + DNS over HTTPS (with [Quad9](https://www.quad9.net/)).
4
+ + Vim | Nano installed.
5
+ + Iptables installed (not configured).
6
+ + Sudo installed (not configured).
7
+ + [iwd](https://iwd.wiki.kernel.org/) installed if wifi is detected.
8
+ + No GUI installed.
9
+
10
+ Hardened System:
11
+ + sysctl.conf with TCP/IP stack hardening and more [Arch](https://wiki.archlinux.org/title/Sysctl)
12
+ + Kernel parameters enforced (dmesg restricted, kexec disabled, etc)
13
+ + Kernel source (Gentoo) patched with [bask](https://github.com/szorfein/bask).
3
14
 
4
15
  ## Description
5
- Actually, Getch support only the [AMD64 handbook](https://wiki.gentoo.org/wiki/Handbook:AMD64) and only with the last `stage3-amd64-systemd`.
16
+ Actually, Getch support only the `x86_64` architecture and only with the following archives:
17
+ + **Gentoo**: `stage3-amd64-systemd` [Gentoo](https://www.gentoo.org/downloads/).
18
+ + **Void**: `rootfs glibc` [Void](https://voidlinux.org/download/).
6
19
 
7
- BIOS system will use `Grub2` and `systemd-boot` for UEFI. Filesystem supported by Getch are for now:
20
+ Filesystem supported (with or without encryption)
8
21
  + Ext4
9
- + LVM
22
+ + Lvm
10
23
  + ZFS
11
24
 
12
- Encryption is also supported.
25
+ Boot Manager:
26
+ + **Gentoo**: `BIOS` will use `Grub2` and `systemd-boot` for `UEFI`.
27
+ + **Void**: use only Grub2, encryption for the root fs use luks1.
13
28
 
14
29
  The ISO images i was able to test and that works:
15
30
  + [Archlinux](https://www.archlinux.org/download/)
16
31
  + [Archaeidae](https://github.com/szorfein/archaeidae): Custom Archiso that includes ZFS support.
17
32
 
33
+ ## Dependencies
34
+ Getch is build without external libs, so it only require `ruby >= 2.5`.
35
+
18
36
  ## Install
19
37
  Getch is cryptographically signed, so add my public key (if you haven’t already) as a trusted certificate.
20
38
  With `gem` installed:
21
39
 
22
40
  $ gem cert --add <(curl -Ls https://raw.githubusercontent.com/szorfein/getch/master/certs/szorfein.pem)
23
-
24
41
  $ gem install getch -P HighSecurity
25
42
 
26
- When you boot from an `iso`, you can install `ruby`, `getch` and correct your `PATH=` directly with the `bin/setup.sh`:
27
-
28
- # sh <(curl -L https://raw.githubusercontent.com/szorfein/getch/master/bin/setup.sh)
29
- # source ~/.zshrc # or ~/.bashrc
30
-
31
- If you want to try the master branch:
43
+ If you want to try the master branch (can be unstable):
32
44
 
33
45
  # git clone https://github.com/szorfein/getch
34
46
  # cd getch
@@ -46,26 +58,30 @@ For a french user:
46
58
 
47
59
  # getch --zoneinfo "Europe/Paris" --language fr_FR --keymap fr
48
60
 
49
- Install Gentoo on LVM:
61
+ Install Gentoo on LVM and use a different root disk `/dev/sdc`
50
62
 
51
- # getch --format lvm --disk sda
63
+ # getch --format lvm --disk sdc
52
64
 
53
65
  Encrypt your disk with LVM with a french keymap
54
66
 
55
67
  # getch --format lvm --encrypt --keymap fr
56
68
 
57
- Encrypt with ext4 and create a home directory /home/ninja
69
+ Encrypt with ext4 and create a new user `ninja`:
58
70
 
59
71
  # getch --format ext4 --encrypt --username ninja
60
72
 
61
- With ZFS:
73
+ With ZFS, if used with `--encrypt`, it use the native ZFS encryption:
62
74
 
63
75
  # getch --format zfs
64
76
 
77
+ With `Void Linux`:
78
+
79
+ # getch --os void --encrypt -k fr
80
+
65
81
  ## Troubleshooting
66
82
 
67
- #### LVM
68
- Unless your old LVM volume group is also named `vg0`, `getch` may fail to partition your disk. You have to clean up your device before proceed with `vgremove` and `pvremove`. An short example how doing this with a volume group named `vg0`:
83
+ #### Old VG for LVM
84
+ If a old volume group exist, `getch` may fail to partition your disk. You have to clean up your device before proceed with `vgremove` and `pvremove`. An short example how doing this with a volume group named `vg0`:
69
85
 
70
86
  # vgdisplay | grep vg0
71
87
  # vgremove -f vg0
@@ -75,13 +91,13 @@ Unless your old LVM volume group is also named `vg0`, `getch` may fail to partit
75
91
  To decrypt your disk on BIOS system, you have to enter your password twice. One time for Grub and another time for Genkernel. [post](https://wiki.archlinux.org/index.php/GRUB#Encrypted_/boot).
76
92
  Also with GRUB, only a `us` keymap is working.
77
93
 
78
- #### ZFS
94
+ #### ZFS for Gentoo
79
95
  When Gentoo boot the first time, the pool may fail to start, it's happen when the pool has not been `export` to the ISO. So just `export` your pool from the genkernel shell:
80
96
 
81
97
  The zpool name should be visible (rpool-150ed here), so enter in the Genkernel shell:
82
98
 
83
99
  > shell
84
- zpool import -f -N -R /mnt rpool-150ed
100
+ zpool import -f -N -R /tmp rpool-150ed
85
101
  zpool export -a
86
102
 
87
103
  Then, just reboot now, it's all.
@@ -93,7 +109,31 @@ Then, just reboot now, it's all.
93
109
 
94
110
  The pool will be called `rpool-150ed`.
95
111
 
96
- ## Issues
97
- If need more support for your hardware (network, sound card, ...), you can submit a [new issue](https://github.com/szorfein/getch/issues/new) and post the output of the following command:
98
- + lspci
99
- + cat /proc/modules
112
+ #### ZFS for Void Linux - Enable the boot pool
113
+ You have some extras step to do after booting to enable the boot pool, you need this pool when you update your system. It's used mainly by Grub and Dracut.
114
+ By default, your /boot is empty because your boot pool is not imported...
115
+
116
+ # zpool import -N bpool150ed
117
+ # zfs mount bpool150ed/BOOT/void
118
+ # ls /boot
119
+
120
+ You should see something in the boot (initramfs, vmlinuz).. Recreate the initramfs.
121
+
122
+ # xbps-reconfigure -fa
123
+
124
+ Transform the boot pool in legacy mode and add this to the fstab:
125
+
126
+ # zfs set mountpoint=legacy bpool150ed/BOOT/void
127
+ # echo "bpool150ed/BOOT/void /boot zfs defaults 0 0" >> /etc/fstab
128
+ # mount /boot
129
+
130
+ The /boot should not be empty again and then, reboot. `fstab` should do this automatically now.
131
+
132
+ #### ZFS Encrypted with Void
133
+ Well, another weird issue, the first time you boot on your encrypted pool, nothing append. Dracut try to mount inexistent device. Just wait for enter in the shell:
134
+
135
+ # ls /lib/dracut/hooks/initqueue/finished/*
136
+ # rm /lib/dracut/hooks/initqueue/finished/dev*
137
+ # exit
138
+
139
+ Dracut should finally start `mount-zfs.sh` and ask for your password. After you first login, follow instructions above for recompile the initramfs and mount the boot pool and your good.
@@ -0,0 +1,63 @@
1
+ # https://wiki.archlinux.org/title/Sysctl#TCP/IP_stack_hardening
2
+ # https://github.com/trimstray/the-practical-linux-hardening-guide/wiki/Network-stack
3
+
4
+ # TCP SYN cookie protection
5
+ net.ipv4.tcp_syncookies = 1
6
+
7
+ # TCP rfc1337
8
+ net.ipv4.tcp_rfc1337 = 1
9
+
10
+ # Reverse path filtering
11
+ net.ipv4.conf.default.rp_filter = 1
12
+ net.ipv4.conf.all.rp_filter = 1
13
+
14
+ # Log martian packets
15
+ net.ipv4.conf.default.log_martians = 1
16
+ net.ipv4.conf.all.log_martians = 1
17
+
18
+ # Disable ICMP redirects
19
+ net.ipv6.conf.all.accept_redirects = 0
20
+ net.ipv6.conf.default.accept_redirects = 0
21
+
22
+ # Disable IP source routing
23
+ net.ipv4.conf.default.accept_source_route = 0
24
+ net.ipv4.conf.all.accept_source_route = 0
25
+
26
+ # Ignore ICMP echo requests
27
+ net.ipv4.icmp_echo_ignore_all = 1
28
+ net.ipv6.icmp.echo_ignore_all = 1
29
+
30
+ # Ignoring broadcasts request
31
+ net.ipv4.icmp_echo_ignore_broadcasts = 1
32
+
33
+ # An illicit router advertisement message could result in a man-in-the-middle attack.
34
+ net.ipv6.conf.default.accept_ra = 0
35
+ net.ipv6.conf.all.accept_ra = 0
36
+
37
+ # Ignore bogus ICMP error responses
38
+ net.ipv4.icmp_ignore_bogus_error_responses = 1
39
+
40
+ # ICMP redirects
41
+ net.ipv4.conf.default.accept_redirects = 0
42
+ net.ipv4.conf.all.accept_redirects = 0
43
+
44
+ # Accepting secure redirects
45
+ net.ipv4.conf.default.secure_redirects = 0
46
+ net.ipv4.conf.all.secure_redirects = 0
47
+
48
+ # IP forwarding
49
+ net.ipv4.ip_forward = 0
50
+
51
+ # Sending ICMP redirects
52
+ net.ipv4.conf.default.send_redirects = 0
53
+ net.ipv4.conf.all.send_redirects = 0
54
+
55
+ # Keep sockets in FIN-WAIT-2 state
56
+ net.ipv4.tcp_fin_timeout = 30
57
+
58
+ # Keepalive packets to keep an connection alive
59
+ net.ipv4.tcp_keepalive_time = 180
60
+ net.ipv4.tcp_keepalive_intvl = 10
61
+ net.ipv4.tcp_keepalive_probes = 3
62
+
63
+
data/bin/getch CHANGED
@@ -2,8 +2,16 @@
2
2
 
3
3
  require 'getch'
4
4
 
5
- def main(argv)
6
- Getch::main(argv)
7
- end
5
+ getch = Getch::Main.new(
6
+ :cli => Getch::Options.new(ARGV)
7
+ )
8
8
 
9
- main(ARGV)
9
+ getch.resume
10
+
11
+ getch.partition
12
+ getch.format
13
+ getch.mount
14
+
15
+ getch.install
16
+
17
+ getch.configure
data/lib/getch.rb CHANGED
@@ -1,27 +1,30 @@
1
1
  require_relative 'getch/options'
2
2
  require_relative 'getch/states'
3
3
  require_relative 'getch/gentoo'
4
+ require_relative 'getch/void'
4
5
  require_relative 'getch/filesystem'
5
6
  require_relative 'getch/command'
6
7
  require_relative 'getch/helpers'
7
8
  require_relative 'getch/log'
8
9
  require_relative 'getch/config'
9
10
  require_relative 'getch/guard'
11
+ require_relative 'getch/version'
10
12
 
11
13
  module Getch
12
14
 
13
- DEFAULT_OPTIONS = {
14
- language: 'en_US',
15
- zoneinfo: 'US/Eastern',
16
- keymap: 'us',
17
- disk: 'sda',
18
- fs: 'ext4',
19
- username: nil,
20
- boot_disk: nil,
21
- cache_disk: nil,
22
- home_disk: nil,
23
- encrypt: false,
24
- verbose: false
15
+ OPTIONS = {
16
+ :language => 'en_US',
17
+ :zoneinfo => 'US/Eastern',
18
+ :keymap => 'us',
19
+ :disk => false,
20
+ :fs => 'ext4',
21
+ :username => false,
22
+ :os => 'gentoo',
23
+ :boot_disk => false,
24
+ :cache_disk => false,
25
+ :home_disk => false,
26
+ :encrypt => false,
27
+ :verbose => false
25
28
  }
26
29
 
27
30
  STATES = {
@@ -34,86 +37,118 @@ module Getch
34
37
  :gentoo_kernel => false
35
38
  }
36
39
 
37
- MOUNTPOINT = "/mnt/gentoo".freeze
40
+ MOUNTPOINT = "/mnt/gentoo"
41
+
38
42
  DEFAULT_FS = {
39
43
  true => {
40
- ext4: Getch::FileSystem::Ext4::Encrypt,
41
- lvm: Getch::FileSystem::Lvm::Encrypt,
42
- zfs: Getch::FileSystem::Zfs::Encrypt
44
+ ext4: FileSystem::Ext4::Encrypt,
45
+ lvm: FileSystem::Lvm::Encrypt,
46
+ zfs: FileSystem::Zfs::Encrypt
43
47
  },
44
48
  false => {
45
- ext4: Getch::FileSystem::Ext4,
46
- lvm: Getch::FileSystem::Lvm,
47
- zfs: Getch::FileSystem::Zfs,
49
+ ext4: FileSystem::Ext4,
50
+ lvm: FileSystem::Lvm,
51
+ zfs: FileSystem::Zfs,
48
52
  }
49
53
  }.freeze
50
54
 
51
- def self.class_fs
52
- encrypt = DEFAULT_OPTIONS[:encrypt]
53
- fs = DEFAULT_OPTIONS[:fs].to_sym
54
- DEFAULT_FS[encrypt][fs]
55
+ def self.select_fs
56
+ encrypt = OPTIONS[:encrypt]
57
+ fs_sym = OPTIONS[:fs].to_sym
58
+ DEFAULT_FS[encrypt][fs_sym]
55
59
  end
56
60
 
57
- def self.resume_options(opts)
58
- puts "\nBuild Gentoo with the following args:\n"
59
- puts "Lang: #{DEFAULT_OPTIONS[:language]}"
60
- puts "Zoneinfo: #{DEFAULT_OPTIONS[:zoneinfo]}"
61
- puts "Keymap: #{DEFAULT_OPTIONS[:keymap]}"
62
- puts "Disk: #{DEFAULT_OPTIONS[:disk]}"
63
- puts "Filesystem: #{DEFAULT_OPTIONS[:fs]}"
64
- puts "Username: #{DEFAULT_OPTIONS[:username]}"
65
- puts "Encrypt: #{DEFAULT_OPTIONS[:encrypt]}"
66
- puts
67
- puts "separate-boot disk: #{DEFAULT_OPTIONS[:boot_disk]}"
68
- puts "separate-cache disk: #{DEFAULT_OPTIONS[:cache_disk]}"
69
- puts "separate-home disk: #{DEFAULT_OPTIONS[:home_disk]}"
70
- puts
71
- print "Continue? (n,y) "
72
- case gets.chomp
73
- when /^y|^Y/
74
- return
75
- else
76
- exit 1
61
+ class Main
62
+ def initialize(argv)
63
+ argv[:cli]
64
+ @class_fs = Getch::select_fs
65
+ @log = Log.new
66
+ Getch::States.new # Update States
77
67
  end
78
- end
79
68
 
80
- def self.format(disk, fs, user)
81
- return if STATES[:format] and STATES[:partition]
82
- log = Log.new
83
- puts
84
- print "Partition and format disk #{disk}, this will erase all data, continue? (n,y) "
85
- case gets.chomp
86
- when /^y|^Y/
87
- log.info("Partition start")
88
- class_fs::Partition.new
89
- class_fs::Format.new
90
- else
91
- exit 1
69
+ def resume
70
+ raise "No disk, use at least getch with -d DISK" if !OPTIONS[:disk]
71
+ puts "\nBuild " + OPTIONS[:os].capitalize + " Linux with the following args:\n"
72
+ puts
73
+ puts "\tLang: #{OPTIONS[:language]}"
74
+ puts "\tZoneinfo: #{OPTIONS[:zoneinfo]}"
75
+ puts "\tKeymap: #{OPTIONS[:keymap]}"
76
+ puts "\tDisk: #{OPTIONS[:disk]}"
77
+ puts "\tFilesystem: #{OPTIONS[:fs]}"
78
+ puts "\tUsername: #{OPTIONS[:username]}"
79
+ puts "\tEncrypt: #{OPTIONS[:encrypt]}"
80
+ puts
81
+ puts "\tseparate-boot disk: #{OPTIONS[:boot_disk]}"
82
+ puts "\tseparate-cache disk: #{OPTIONS[:cache_disk]}"
83
+ puts "\tseparate-home disk: #{OPTIONS[:home_disk]}"
84
+ puts
85
+ print "Continue? (y,N) "
86
+ case gets.chomp
87
+ when /^y|^Y/
88
+ return
89
+ else
90
+ exit
91
+ end
92
92
  end
93
- end
94
93
 
95
- def self.init_gentoo(options)
96
- gentoo = Getch::Gentoo
97
- gentoo.stage3
98
- gentoo.config(options)
99
- gentoo.chroot(options)
100
- gentoo.kernel
101
- gentoo.boot(options)
102
- end
94
+ def partition
95
+ return if STATES[:partition]
96
+ puts
97
+ print "Partition and format disk #{OPTIONS[:disk]}, this will erase all data, continue? (y,N) "
98
+ case gets.chomp
99
+ when /^y|^Y/
100
+ @log.info("Partition start")
101
+ @class_fs::Partition.new
102
+ else
103
+ exit
104
+ end
105
+ end
103
106
 
104
- def self.configure(options)
105
- config = Getch::Config.new
106
- config.network
107
- end
107
+ def format
108
+ return if STATES[:format]
109
+ @class_fs::Format.new
110
+ end
108
111
 
109
- def self.main(argv)
110
- options = Options.new(argv)
111
- DEFAULT_OPTIONS.freeze
112
- resume_options(options)
113
- Getch::States.new # Update States
114
- format(options.disk, options.fs, options.username)
115
- class_fs::Mount.new.run
116
- init_gentoo(options)
117
- configure(options)
112
+ def mount
113
+ return if STATES[:mount]
114
+ @class_fs::Mount.new.run
115
+ end
116
+
117
+ def install
118
+ if OPTIONS[:os] == 'gentoo'
119
+ install_gentoo
120
+ elsif OPTIONS[:os] == 'void'
121
+ install_void
122
+ else
123
+ puts "Options #{OPTIONS[:os]} not supported...."
124
+ exit 1
125
+ end
126
+ end
127
+
128
+ def install_gentoo
129
+ gentoo = Getch::Gentoo::Main.new
130
+ gentoo.stage3
131
+ gentoo.config
132
+ gentoo.chroot
133
+ gentoo.kernel
134
+ gentoo.boot
135
+ end
136
+
137
+ def install_void
138
+ void = Getch::Void::Main.new
139
+ void.root_fs
140
+ void.config
141
+ void.chroot
142
+ void.boot
143
+ end
144
+
145
+ def configure
146
+ config = Getch::Config::Main.new
147
+ config.ethernet
148
+ config.wifi
149
+ config.dns
150
+ config.sysctl
151
+ config.shell
152
+ end
118
153
  end
119
154
  end