Skip to content

Commit

Permalink
add base class for bootloaders and none bootloader
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Jan 5, 2016
1 parent c0afb69 commit acb91bc
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/lib/bootloader/bootloader_base.rb
@@ -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
19 changes: 19 additions & 0 deletions src/lib/bootloader/none_bootloader.rb
@@ -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

0 comments on commit acb91bc

Please sign in to comment.