Class: Bootloader::Grub2Widget::GenericMBRWidget

Inherits:
CWM::CheckBox
  • Object
show all
Includes:
Grub2Helper
Defined in:
src/lib/bootloader/grub2_widgets.rb

Overview

Represents decision if generic MBR have to be installed on disk

Instance Method Summary collapse

Methods included from Grub2Helper

#grub2, #grub_default, #password, #stage1

Constructor Details

#initializeGenericMBRWidget

Returns a new instance of GenericMBRWidget.



127
128
129
130
131
# File 'src/lib/bootloader/grub2_widgets.rb', line 127

def initialize
  textdomain "bootloader"

  super
end

Instance Method Details

#helpObject



137
138
139
140
141
142
143
# File 'src/lib/bootloader/grub2_widgets.rb', line 137

def help
  _(
    "<p><b>Write generic Boot Code to MBR</b> replace the master boot" \
    " record of your disk with generic code (OS independent code which\n" \
    "boots the active partition).</p>"
  )
end

#initObject



145
146
147
# File 'src/lib/bootloader/grub2_widgets.rb', line 145

def init
  self.value = stage1.generic_mbr?
end

#labelObject



133
134
135
# File 'src/lib/bootloader/grub2_widgets.rb', line 133

def label
  _("Write &generic Boot Code to MBR")
end

#storeObject



149
150
151
# File 'src/lib/bootloader/grub2_widgets.rb', line 149

def store
  stage1.generic_mbr = checked?
end