Class: Bootloader::AutoClient

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

Overview

Autoyast client for bootloader

Class Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.changedObject

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

#changeObject



62
63
64
# File 'src/lib/bootloader/auto_client.rb', line 62

def change
  ::Bootloader::MainDialog.new.run_auto
end

#exportObject

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

#modifiedObject



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

def modified
  self.class.changed = true
end

#modified?Boolean

Returns:

  • (Boolean)


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

def modified?
  self.class.changed
end

#readObject



83
84
85
86
# File 'src/lib/bootloader/auto_client.rb', line 83

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

#resetObject



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

def reset
  Yast::Bootloader.Reset
end

#runObject



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

#summaryObject



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

#writeObject



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

def write
  Yast::Bootloader.Write
end