Class: Bootloader::ConfigDialog

Inherits:
Object
  • Object
show all
Includes:
Yast::I18n, Yast::Logger, Yast::UIShortcuts
Defined in:
src/lib/bootloader/config_dialog.rb

Overview

Dialog for whole bootloader configuration

Instance Method Summary (collapse)

Instance Method Details

- (Object) run



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'src/lib/bootloader/config_dialog.rb', line 20

def run
  textdomain "bootloader"

  log.info "Running Main Dialog"

  # F#300779 - Install diskless client (NFS-root)
  # additional warning that root partition is nfs type -> bootloader will not be installed
  device = Yast::BootStorage.disk_with_boot_partition

  if device == "/dev/nfs" && Yast::Mode.installation
    Yast::Popup.Message(
      _(
        "The boot partition is of type NFS. Bootloader cannot be installed."
      )
    )
    log.info "Boot partition is nfs type, bootloader will not be installed."
    return :next
  end
  # F#300779: end

  if BootloaderFactory.current.is_a?(NoneBootloader)
    contents = VBox(LoaderTypeWidget.new)
  else
    tabs = CWM::Tabs.new(BootCodeTab.new, KernelTab.new, BootloaderTab.new)
    contents = VBox(tabs)
  end

  Yast::CWM.show(
    contents,
    caption:        _("Boot Loader Settings"),
    back_button:    "",
    abort_button:   Yast::Label.CancelButton,
    next_button:    Yast::Label.OKButton,
    skip_store_for: [:redraw]
  )
end