Class: Bootloader::AutoClient
- Inherits:
-
Installation::AutoClient
- Object
- Installation::AutoClient
- Bootloader::AutoClient
- Includes:
- Yast::I18n
- Defined in:
- src/lib/bootloader/auto_client.rb
Overview
Autoyast client for bootloader
Class Attribute Summary collapse
-
.changed ⇒ Object
Returns the value of attribute changed.
Instance Method Summary collapse
- #change ⇒ Object
-
#export ⇒ Object
Return configuration data.
- #import(data) ⇒ Object
- #modified ⇒ Object
- #modified? ⇒ Boolean
- #read ⇒ Object
- #reset ⇒ Object
- #run ⇒ Object
- #summary ⇒ Object
- #write ⇒ Object
Class Attribute Details
.changed ⇒ Object
Returns the value of attribute changed.
24 25 26 |
# File 'src/lib/bootloader/auto_client.rb', line 24 def changed @changed end |
Instance Method Details
#change ⇒ Object
62 63 64 |
# File 'src/lib/bootloader/auto_client.rb', line 62 def change ::Bootloader::MainDialog.new.run_auto end |
#export ⇒ Object
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 https://github.com/yast/yast-bootloader/pull/272
return map or list
75 76 77 |
# File 'src/lib/bootloader/auto_client.rb', line 75 def export Yast::Bootloader.Export end |
#import(data) ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'src/lib/bootloader/auto_client.rb', line 35 def import(data) return true unless Yast::Bootloader.Import(data) Yast::PackagesProposal.AddResolvables("yast2-bootloader", :package, BootloaderFactory.current.packages) true end |
#modified ⇒ Object
54 55 56 |
# File 'src/lib/bootloader/auto_client.rb', line 54 def modified self.class.changed = true end |
#modified? ⇒ Boolean
50 51 52 |
# File 'src/lib/bootloader/auto_client.rb', line 50 def modified? self.class.changed end |
#read ⇒ Object
83 84 85 86 |
# File 'src/lib/bootloader/auto_client.rb', line 83 def read Yast::Initrd.Read Yast::Bootloader.Read end |
#reset ⇒ Object
58 59 60 |
# File 'src/lib/bootloader/auto_client.rb', line 58 def reset Yast::Bootloader.Reset end |
#run ⇒ Object
27 28 29 30 31 32 33 |
# File 'src/lib/bootloader/auto_client.rb', line 27 def run progress_orig = Yast::Progress.set(false) ret = super Yast::Progress.set(progress_orig) ret end |
#summary ⇒ Object
44 45 46 47 48 |
# File 'src/lib/bootloader/auto_client.rb', line 44 def summary formatted_summary = Yast::Bootloader.Summary.map { |l| "<LI>#{l}</LI>" } "<UL>#{formatted_summary.join("\n")}</UL>" end |
#write ⇒ Object
79 80 81 |
# File 'src/lib/bootloader/auto_client.rb', line 79 def write Yast::Bootloader.Write end |