Module: Yast::BootloaderRoutinesSwitcherInclude
- Defined in:
- src/include/bootloader/routines/switcher.rb
Instance Method Summary (collapse)
-
- (Object) blDialogs
Get the loader-specific dialogs.
-
- (Hash) blExport
Export bootloader-specific settings.
-
- (Boolean) blFlagOnetimeBoot(section)
Set section to boot on next reboot for this type of bootloader.
-
- (Boolean) blImport(settings)
Import settings to bootloader.
-
- (Object) blPropose
Propose bootloader settings.
-
- (Boolean) blRead(reread, avoid_reading_device_map)
Read bootloader-specific settings.
-
- (Object) blReset
Reset bootloader-specific settings.
-
- (Boolean) blSave(clean, init, flush)
Save bootloader cfg.
-
- (Object) blSummary
Get cfg.
-
- (Object) blUpdate
Update bootloader-specific settings.
-
- (Object) blWidgetMaps
Get description maps of loader-specific widgets.
-
- (Boolean) blWrite
Do the bootloader installation.
-
- (Object) get_function(method)
Get method for current bootloader.
-
- (Hash) get_functions(bootloader)
Get map of main functions for bootloader.
- - (Object) initialize_bootloader_routines_switcher(_include_target)
Instance Method Details
- (Object) blDialogs
Get the loader-specific dialogs
118 119 120 121 |
# File 'src/include/bootloader/routines/switcher.rb', line 118 def blDialogs method = get_function(:dialogs) method ? method.call : {} end |
- (Hash) blExport
Export bootloader-specific settings
55 56 57 |
# File 'src/include/bootloader/routines/switcher.rb', line 55 def blExport get_function(:Export).call end |
- (Boolean) blFlagOnetimeBoot(section)
Set section to boot on next reboot for this type of bootloader
126 127 128 129 |
# File 'src/include/bootloader/routines/switcher.rb', line 126 def blFlagOnetimeBoot(section) method = get_function(:flagonetimeboot) method ? method.call(section) : false end |
- (Boolean) blImport(settings)
Import settings to bootloader
62 63 64 |
# File 'src/include/bootloader/routines/switcher.rb', line 62 def blImport(settings) get_function(:Import).call(settings) end |
- (Object) blPropose
Propose bootloader settings
79 80 81 |
# File 'src/include/bootloader/routines/switcher.rb', line 79 def blPropose get_function(:Propose).call end |
- (Boolean) blRead(reread, avoid_reading_device_map)
Read bootloader-specific settings
69 70 71 |
# File 'src/include/bootloader/routines/switcher.rb', line 69 def blRead(reread, avoid_reading_device_map) get_function(:Read).call(reread, avoid_reading_device_map) end |
- (Object) blReset
Reset bootloader-specific settings
74 75 76 |
# File 'src/include/bootloader/routines/switcher.rb', line 74 def blReset get_function(:Reset).call end |
- (Boolean) blSave(clean, init, flush)
Save bootloader cfg. files to the cache of the pluglib
88 89 90 |
# File 'src/include/bootloader/routines/switcher.rb', line 88 def blSave(clean, init, flush) get_function(:Save).call(clean, init, flush) end |
- (Object) blSummary
Get cfg. summary
94 95 96 |
# File 'src/include/bootloader/routines/switcher.rb', line 94 def blSummary get_function(:Summary).call end |
- (Object) blUpdate
Update bootloader-specific settings
99 100 101 |
# File 'src/include/bootloader/routines/switcher.rb', line 99 def blUpdate get_function(:Update).call end |
- (Object) blWidgetMaps
Get description maps of loader-specific widgets
111 112 113 114 |
# File 'src/include/bootloader/routines/switcher.rb', line 111 def blWidgetMaps method = get_function(:widgets) method ? method.call : {} end |
- (Boolean) blWrite
Do the bootloader installation
105 106 107 |
# File 'src/include/bootloader/routines/switcher.rb', line 105 def blWrite get_function(:Write).call end |
- (Object) get_function(method)
Get method for current bootloader
27 28 29 30 31 32 33 34 35 |
# File 'src/include/bootloader/routines/switcher.rb', line 27 def get_function(method) functions = get_functions(BootCommon.getLoaderType(false)) ret = functions[method.to_s.downcase] if !ret && BootCommon.methods.include?(method) ret = BootCommon.method(method) end ret end |
- (Hash) get_functions(bootloader)
Get map of main functions for bootloader
40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'src/include/bootloader/routines/switcher.rb', line 40 def get_functions(bootloader) bl_functions = { "grub2" => BootGRUB2.method(:GetFunctions), "grub2-efi" => BootGRUB2EFI.method(:GetFunctions) } gf = bl_functions[bootloader] if !gf Builtins.y2warning("No bootloader-specific functions specified for #{bootloader.inspect}") return {} end gf.call end |
- (Object) initialize_bootloader_routines_switcher(_include_target)
20 21 22 23 24 |
# File 'src/include/bootloader/routines/switcher.rb', line 20 def initialize_bootloader_routines_switcher(_include_target) Yast.import "BootGRUB2" Yast.import "BootGRUB2EFI" Yast.import "BootCommon" end |