Skip to content

Commit

Permalink
Merge pull request #1299 from yast/adapt_kernel
Browse files Browse the repository at this point in the history
Adapt kernel
  • Loading branch information
jreidinger authored Jan 24, 2024
2 parents 237b6a5 + 560184f commit d6ae868
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
9 changes: 5 additions & 4 deletions library/system/src/modules/Kernel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,14 @@ def ParseInstallationKernelCmdline
@cmdline_parsed = true
return if !(Stage.initial || Stage.cont)

# live installation does not create /etc/install.inf (bsc#793065)
tmp = if Mode.live_installation
# Check if /etc/install.inf exists
tmp = if SCR.Dir(path(".etc.install_inf")).empty?
# not using dedicated agent in order to use the same parser for cmdline
# independently on whether it comes from /proc/cmdline or /etc/install.inf
Convert.to_string(SCR.Read(path(".target.string"), "/proc/cmdline"))
# use local read as it does not make sense to depend on binding it to chroot
WFM.Read(path(".local.string"), "/proc/cmdline").to_s
else
Convert.to_string(SCR.Read(path(".etc.install_inf.Cmdline")))
SCR.Read(path(".etc.install_inf.Cmdline")).to_s
end

Builtins.y2milestone(
Expand Down
1 change: 1 addition & 0 deletions library/system/test/kernel_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@

describe ".ParseInstallationKernelCmdline" do
before do
allow(Yast::SCR).to receive(:Dir).with(path(".etc.install_inf")).and_return(["CmdLine"])
allow(Yast::SCR).to receive(:Read).with(path(".etc.install_inf.Cmdline")).and_return(cmdline)
allow(Yast::Stage).to receive(:initial).and_return(true)
allow(Yast::Arch).to receive(:architecture).and_return("x86_64")
Expand Down
7 changes: 7 additions & 0 deletions package/yast2.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Jan 23 12:52:08 UTC 2024 - Josef Reidinger <jreidinger@suse.com>

- Reading Kernel Params: Use kernel cmdline when install.inf is not
available (bsc#1216408)
- 5.0.4

-------------------------------------------------------------------
Wed Nov 1 08:35:38 UTC 2023 - Ladislav Slezák <lslezak@suse.com>

Expand Down
2 changes: 1 addition & 1 deletion package/yast2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2
Version: 5.0.3
Version: 5.0.4

Release: 0
Summary: YaST2 Main Package
Expand Down

0 comments on commit d6ae868

Please sign in to comment.