Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d0f38e0
commit 8659279
Showing
4 changed files
with
102 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# encoding: utf-8 | ||
require "yast" | ||
|
||
module Yast | ||
class GRUB2Base < Module | ||
def main | ||
Yast.import "UI" | ||
|
||
textdomain "bootloader" | ||
|
||
Yast.import "BootArch" | ||
Yast.import "BootCommon" | ||
Yast.import "BootStorage" | ||
Yast.import "Kernel" | ||
Yast.import "Mode" | ||
Yast.import "Stage" | ||
Yast.import "Storage" | ||
Yast.import "StorageDevices" | ||
Yast.import "Pkg" | ||
Yast.import "HTML" | ||
Yast.import "Initrd" | ||
Yast.import "Product" | ||
|
||
# includes | ||
# for simplified widgets than other | ||
Yast.include self, "bootloader/grub2/dialogs.rb" | ||
end | ||
|
||
# general functions | ||
|
||
# Propose global options of bootloader | ||
def StandardGlobals | ||
{ | ||
"timeout" => "8", | ||
"default" => "0", | ||
"vgamode" => "", | ||
"gfxmode" => "auto", | ||
"terminal" => "gfxterm", | ||
"os_prober" => "true" | ||
} | ||
end | ||
|
||
# Update read settings to new version of configuration files | ||
def Update | ||
Read(true, true) | ||
|
||
#we don't handle sections, grub2 section create them for us | ||
#BootCommon::UpdateSections (); | ||
BootCommon.UpdateGlobals | ||
|
||
nil | ||
end | ||
|
||
# Reset bootloader settings | ||
# @param [Boolean] init boolean true to repropose also device map | ||
def Reset(init) | ||
return if Mode.autoinst | ||
BootCommon.Reset(init) | ||
|
||
nil | ||
end | ||
|
||
def Dialogs | ||
Builtins.y2milestone("Called GRUB2 Dialogs") | ||
{ | ||
"installation" => fun_ref( | ||
method(:Grub2InstallDetailsDialog), | ||
"symbol ()" | ||
), | ||
"loader" => fun_ref( | ||
method(:Grub2LoaderDetailsDialog), | ||
"symbol ()" | ||
) | ||
} | ||
end | ||
|
||
# Initializer of GRUB bootloader | ||
def Initializer | ||
Builtins.y2milestone("Called GRUB2 initializer") | ||
BootCommon.current_bootloader_attribs = { | ||
"propose" => false, | ||
"read" => false, | ||
"scratch" => false, | ||
"restore_mbr" => false, | ||
"bootloader_on_disk" => false | ||
} | ||
|
||
nil | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters