Class: Bootloader::AutoClient

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

Overview

Autoyast client for bootloader

Instance Method Summary (collapse)

Constructor Details

- (AutoClient) initialize

Returns a new instance of AutoClient



6
7
8
9
10
11
12
13
14
15
16
17
# File 'src/lib/bootloader/auto_client.rb', line 6

def initialize
  Yast.import "UI"

  Yast.import "Bootloader"
  Yast.import "BootCommon"
  Yast.import "Initrd"
  Yast.import "Progress"
  Yast.import "Mode"

  Yast.include self, "bootloader/routines/autoinstall.rb"
  Yast.include self, "bootloader/routines/wizards.rb"
end

Instance Method Details

- (Object) change



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

def change
  BootloaderAutoSequence()
end

- (Object) export



66
67
68
# File 'src/lib/bootloader/auto_client.rb', line 66

def export
  Export2AI(Yast::Bootloader.Export)
end

- (Object) import(data)



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'src/lib/bootloader/auto_client.rb', line 27

def import(data)
  data = AI2Export(data)
  if data
    ret = Yast::Bootloader.Import(data)
    # moved here from inst_autosetup*
    if Yast::Stage.initial
      Yast::BootCommon.DetectDisks
      Yast::Bootloader.Propose
    end
  else
    log.error "Failed to convert autoyast profile to standard form"
    ret = false
  end

  ret
end

- (Object) modified



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

def modified
  BootCommon.changed = true
end

- (Boolean) modified?

Returns:

  • (Boolean)


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

def modified?
  BootCommon.changed
end

- (Object) read



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

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

- (Object) reset



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

def reset
  Bootloader.Reset
end

- (Object) run



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

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

  ret
end

- (Object) summary



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

- (Object) write



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

def write
  Yast::Bootloader.Write
end