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.



129
130
131
132
133
# File 'src/lib/bootloader/grub2_widgets.rb', line 129

def initialize
  textdomain "bootloader"

  super
end

Instance Method Details

#helpObject



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

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



147
148
149
# File 'src/lib/bootloader/grub2_widgets.rb', line 147

def init
  self.value = stage1.generic_mbr?
end

#labelObject



135
136
137
# File 'src/lib/bootloader/grub2_widgets.rb', line 135

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

#storeObject



151
152
153
# File 'src/lib/bootloader/grub2_widgets.rb', line 151

def store
  stage1.generic_mbr = checked?
end