Skip to content

Commit

Permalink
refactor failsafe kernel params
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Feb 13, 2015
1 parent 834e5e9 commit a3f586e
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions src/modules/BootArch.rb
Expand Up @@ -71,32 +71,24 @@ def DefaultKernelParams(resume)
# Get parameters for the failsafe kernel
# @return [String] parameters for failsafe kernel
def FailsafeKernelParams
ret = ""
if Arch.i386
ret = "showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset"
elsif Arch.x86_64
ret = "showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset"
elsif Arch.s390
ret = Ops.add(DefaultKernelParams(""), " noresume")
ret = "#{DefaultKernelParams("")} noresume"
else
Builtins.y2warning("Parameters for Failsafe boot option not defined")
ret = ""
end
if Stage.initial
ret = Ops.add(ret, " NOPCMCIA") if Linuxrc.InstallInf("NOPCMCIA") == "1"
ret << " NOPCMCIA" if Linuxrc.InstallInf("NOPCMCIA") == "1"
else
saved_params = Convert.convert(
SCR.Read(path(".target.ycp"), "/var/lib/YaST2/bootloader.ycp"),
:from => "any",
:to => "map <string, any>"
)
ret = Ops.add(
Ops.add(ret, " "),
Ops.get_string(saved_params, "additional_failsafe_params", "")
)
saved_params = SCR.Read(path(".target.ycp"), "/var/lib/YaST2/bootloader.ycp")
ret << (saved_params["additional_failsafe_params"] || "")
end

ret = Ops.add(ret, " x11failsafe")
ret
ret << " x11failsafe"
end

# Is VGA parameter setting available
Expand Down

0 comments on commit a3f586e

Please sign in to comment.