Class: Getch::Gentoo::Chroot
- Inherits:
-
Object
- Object
- Getch::Gentoo::Chroot
- Defined in:
- lib/getch/gentoo/chroot.rb
Instance Method Summary collapse
-
#initialize ⇒ Chroot
constructor
A new instance of Chroot.
- #kernel ⇒ Object
- #systemd ⇒ Object
- #update ⇒ Object
- #world ⇒ Object
Constructor Details
Instance Method Details
#kernel ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/getch/gentoo/chroot.rb', line 30 def kernel puts "Installing kernel gentoo-sources..." cmd = "emerge sys-kernel/gentoo-sources sys-kernel/linux-firmware" license = "#{MOUNTPOINT}/etc/portage/package.license" File.write(license, "sys-kernel/linux-firmware linux-fw-redistributable no-source-code\n") exec_chroot(cmd) end |
#systemd ⇒ Object
24 25 26 27 28 |
# File 'lib/getch/gentoo/chroot.rb', line 24 def systemd puts "Updating locale, keymap..." cmd = "locale-gen; emerge --config sys-libs/timezone-data" exec_chroot(cmd) end |
#update ⇒ Object
9 10 11 12 13 14 |
# File 'lib/getch/gentoo/chroot.rb', line 9 def update return if STATES[:gentoo_update] puts "Downloading the last ebuilds for Gentoo..." cmd = "emerge-webrsync" exec_chroot(cmd) end |
#world ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/getch/gentoo/chroot.rb', line 16 def world return if STATES[:gentoo_update] puts "Update Gentoo" cmd = "emerge --update --deep --newuse @world" exec_chroot(cmd) @state.update end |