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, #sections, #stage1

Constructor Details

#initializeGenericMBRWidget

Returns a new instance of GenericMBRWidget.



189
190
191
192
193
# File 'src/lib/bootloader/grub2_widgets.rb', line 189

def initialize
  textdomain "bootloader"

  super
end

Instance Method Details

#helpObject



199
200
201
202
203
204
205
# File 'src/lib/bootloader/grub2_widgets.rb', line 199

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



207
208
209
# File 'src/lib/bootloader/grub2_widgets.rb', line 207

def init
  self.value = stage1.generic_mbr?
end

#labelObject



195
196
197
# File 'src/lib/bootloader/grub2_widgets.rb', line 195

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

#storeObject



211
212
213
# File 'src/lib/bootloader/grub2_widgets.rb', line 211

def store
  stage1.generic_mbr = checked?
end