Class: Bootloader::AutoClient
- Inherits:
-
Installation::AutoClient
- Object
- Installation::AutoClient
- Bootloader::AutoClient
- Defined in:
- src/lib/bootloader/auto_client.rb
Overview
Autoyast client for bootloader
Class Attribute Summary (collapse)
-
+ (Object) changed
Returns the value of attribute changed.
Instance Method Summary (collapse)
- - (Object) change
-
- (Object) export
Return configuration data.
- - (Object) import(data)
- - (Object) modified
- - (Boolean) modified?
- - (Object) read
- - (Object) reset
- - (Object) run
- - (Object) summary
- - (Object) write
Class Attribute Details
+ (Object) changed
Returns the value of attribute changed
17 18 19 |
# File 'src/lib/bootloader/auto_client.rb', line 17 def changed @changed end |
Instance Method Details
- (Object) change
64 65 66 |
# File 'src/lib/bootloader/auto_client.rb', line 64 def change BootloaderAutoSequence() end |
- (Object) export
Return configuration data
Some of the sections are useless as they're ignored during import. (for example, entries are generated by Grub2 itself).
More details can be found in the original pull request at github.com/yast/yast-bootloader/pull/272
return map or list
77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'src/lib/bootloader/auto_client.rb', line 77 def export # it is needed to have information about storage configuration to understand current config Yast::BootStorage.detect_disks config = BootloaderFactory.current config.read if !config.read? && !config.proposed? result = AutoyastConverter.export(config) log.info "autoyast map for bootloader: #{result.inspect}" result end |
- (Object) import(data)
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'src/lib/bootloader/auto_client.rb', line 28 def import(data) Yast::BootStorage.detect_disks imported_configuration = AutoyastConverter.import(data) BootloaderFactory.clear_cache proposed_configuration = BootloaderFactory.bootloader_by_name(imported_configuration.name) proposed_configuration.propose proposed_configuration.merge(imported_configuration) BootloaderFactory.current = proposed_configuration Yast::PackagesProposal.AddResolvables("yast2-bootloader", :package, proposed_configuration.packages) true end |
- (Object) modified
56 57 58 |
# File 'src/lib/bootloader/auto_client.rb', line 56 def modified self.class.changed = true end |
- (Boolean) modified?
52 53 54 |
# File 'src/lib/bootloader/auto_client.rb', line 52 def modified? self.class.changed end |
- (Object) read
94 95 96 97 |
# File 'src/lib/bootloader/auto_client.rb', line 94 def read Yast::Initrd.Read Yast::Bootloader.Read end |
- (Object) reset
60 61 62 |
# File 'src/lib/bootloader/auto_client.rb', line 60 def reset Yast::Bootloader.Reset end |
- (Object) run
20 21 22 23 24 25 26 |
# File 'src/lib/bootloader/auto_client.rb', line 20 def run progress_orig = Yast::Progress.set(false) ret = super Yast::Progress.set(progress_orig) ret end |
- (Object) summary
46 47 48 49 50 |
# File 'src/lib/bootloader/auto_client.rb', line 46 def summary formatted_summary = Yast::Bootloader.Summary.map { |l| "<LI>#{l}</LI>" } "<UL>" + formatted_summary.join("\n") + "</UL>" end |
- (Object) write
90 91 92 |
# File 'src/lib/bootloader/auto_client.rb', line 90 def write Yast::Bootloader.Write end |