Class: Yast::BootSupportCheckClass
- Inherits:
-
Module
- Object
- Module
- Yast::BootSupportCheckClass
- Includes:
- Logger
- Defined in:
- src/modules/BootSupportCheck.rb
Instance Method Summary collapse
- #main ⇒ Object
-
#StringProblems ⇒ Boolean
Formated string of detected problems Always run SystemSupported before calling this function.
-
#SystemSupported ⇒ Boolean
Check if the system configuraiton is supported Also sets the founds problems into internal variable Always run this function before calling DetectedProblems().
Instance Method Details
#main ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'src/modules/BootSupportCheck.rb', line 23 def main textdomain "bootloader" Yast.import "Bootloader" Yast.import "Arch" Yast.import "BootStorage" Yast.import "FileUtils" Yast.import "Mode" # List of problems found during last check @detected_problems = [] end |
#StringProblems ⇒ Boolean
Formated string of detected problems Always run SystemSupported before calling this function
65 66 67 |
# File 'src/modules/BootSupportCheck.rb', line 65 def StringProblems @detected_problems.join("\n") end |
#SystemSupported ⇒ Boolean
Check if the system configuraiton is supported Also sets the founds problems into internal variable Always run this function before calling DetectedProblems()
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'src/modules/BootSupportCheck.rb', line 40 def SystemSupported @detected_problems = [] lt = ::Bootloader::BootloaderFactory.current.name # detect correct bootloader type supported = correct_loader_type(lt) # check specifics for individual loaders case lt when "grub2" supported = GRUB2() && supported when "grub2-efi" supported = GRUB2EFI() && supported when "systemd-boot" supported = SYSTEMDBOOT() && supported end log.info "Configuration supported: #{supported}" supported end |