Skip to content

Commit

Permalink
adapted suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Jun 26, 2023
1 parent b51a588 commit 921cb7c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
4 changes: 3 additions & 1 deletion src/lib/bootloader/bootloader_factory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ def supported_names
if Yast::Mode.config
# default means bootloader use what it think is the best
result = BootloaderFactory::SUPPORTED_BOOTLOADERS.clone
result << SYSTEMDBOOT if Yast::ProductFeatures.GetBooleanFeature("globals", "enable_systemd_boot")
if Yast::ProductFeatures.GetBooleanFeature("globals", "enable_systemd_boot") &&
Yast::Arch.x86_64 # only x86_64 is supported
result << SYSTEMDBOOT
result << DEFAULT_KEYWORD
return result
end
Expand Down
13 changes: 3 additions & 10 deletions src/lib/bootloader/systemdboot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def initialize
super

textdomain "bootloader"
self.menue_timeout = Yast::ProductFeatures.GetIntegerFeature("globals", "boot_timeout").to_i
end

def merge(other)
Expand All @@ -41,14 +40,6 @@ def merge(other)
self.secure_boot = other.secure_boot unless other.secure_boot.nil?
end

def cpu_mitigations
Bootloader::CpuMitigations.new(:manual)
end

def cpu_mitigations=(value)
log.info "ignoring set of cpu_mitigations (#{value}) in systemd bootloader."
end

def read
super

Expand All @@ -72,6 +63,8 @@ def write(etc_only: false)
def propose
super
log.info("Propose settings...")
self.menue_timeout = Yast::ProductFeatures.GetIntegerFeature("globals", "boot_timeout").to_i
self.secure_boot = Systeminfo.secure_boot_supported?
end

def status_string(status)
Expand Down Expand Up @@ -116,7 +109,7 @@ def packages
res = super

case Yast::Arch.architecture
when "x86_64", "aarch64"
when "x86_64"
res << "shim" << "mokutil" if secure_boot
else
log.warn "Unknown architecture #{Yast::Arch.architecture} for EFI"
Expand Down

0 comments on commit 921cb7c

Please sign in to comment.