Class: Bootloader::AutoClient

Inherits:
Installation::AutoClient
  • Object
show all
Defined in:
src/lib/bootloader/auto_client.rb

Overview

Autoyast client for bootloader

Class Attribute Summary (collapse)

Instance Method Summary (collapse)

Class Attribute Details

+ (Object) changed

Returns the value of attribute changed



18
19
20
# File 'src/lib/bootloader/auto_client.rb', line 18

def changed
  @changed
end

Instance Method Details

- (Object) change



57
58
59
# File 'src/lib/bootloader/auto_client.rb', line 57

def change
  ::Bootloader::MainDialog.new.run_auto
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



70
71
72
# File 'src/lib/bootloader/auto_client.rb', line 70

def export
  Yast::Bootloader.Export
end

- (Object) import(data)



29
30
31
32
33
34
35
36
# File 'src/lib/bootloader/auto_client.rb', line 29

def import(data)
  Yast::Bootloader.Import(data)

  Yast::PackagesProposal.AddResolvables("yast2-bootloader",
    :package, BootloaderFactory.current.packages)

  true
end

- (Object) modified



49
50
51
# File 'src/lib/bootloader/auto_client.rb', line 49

def modified
  self.class.changed = true
end

- (Boolean) modified?

Returns:

  • (Boolean)


45
46
47
# File 'src/lib/bootloader/auto_client.rb', line 45

def modified?
  self.class.changed
end

- (Object) read



78
79
80
81
# File 'src/lib/bootloader/auto_client.rb', line 78

def read
  Yast::Initrd.Read
  Yast::Bootloader.Read
end

- (Object) reset



53
54
55
# File 'src/lib/bootloader/auto_client.rb', line 53

def reset
  Yast::Bootloader.Reset
end

- (Object) run



21
22
23
24
25
26
27
# File 'src/lib/bootloader/auto_client.rb', line 21

def run
  progress_orig = Yast::Progress.set(false)
  ret = super
  Yast::Progress.set(progress_orig)

  ret
end

- (Object) summary



38
39
40
41
42
43
# File 'src/lib/bootloader/auto_client.rb', line 38

def summary
  Yast::BootStorage.detect_disks
  formatted_summary = Yast::Bootloader.Summary.map { |l| "<LI>#{l}</LI>" }

  "<UL>" + formatted_summary.join("\n") + "</UL>"
end

- (Object) write



74
75
76
# File 'src/lib/bootloader/auto_client.rb', line 74

def write
  Yast::Bootloader.Write
end