Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add base class for bootloaders and none bootloader
- Loading branch information
1 parent
c0afb69
commit acb91bc
Showing
2 changed files
with
37 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
require "bootloader/sysconfig" | ||
|
||
module Bootloader | ||
class BootloaderBase | ||
def write | ||
write_sysconfig | ||
end | ||
|
||
def read | ||
end | ||
|
||
protected | ||
def write_sysconfig | ||
sysconfig = Bootloader::Sysconfig.new(bootloader: name) | ||
sysconfig.write | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
require "yast" | ||
|
||
Yast.import "HTML" | ||
|
||
module Bootloader | ||
# Represents when bootloader want user manage itself | ||
class NoneBootloader < BootloaderBase | ||
def summary | ||
[Yast::HTML.Colorize( | ||
_("Do not install any boot loader"), | ||
"red" | ||
)] | ||
end | ||
|
||
def name | ||
"none" | ||
end | ||
end | ||
end |