diff --git a/library/system/src/modules/Kernel.rb b/library/system/src/modules/Kernel.rb index a25339290..6c4347804 100644 --- a/library/system/src/modules/Kernel.rb +++ b/library/system/src/modules/Kernel.rb @@ -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( diff --git a/library/system/test/kernel_test.rb b/library/system/test/kernel_test.rb index 618a3875d..8bba6f3c4 100755 --- a/library/system/test/kernel_test.rb +++ b/library/system/test/kernel_test.rb @@ -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") diff --git a/package/yast2.changes b/package/yast2.changes index 11abc67b3..dfb433979 100644 --- a/package/yast2.changes +++ b/package/yast2.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jan 23 12:52:08 UTC 2024 - Josef Reidinger + +- 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 diff --git a/package/yast2.spec b/package/yast2.spec index 89e252684..93c5b2d74 100644 --- a/package/yast2.spec +++ b/package/yast2.spec @@ -17,7 +17,7 @@ Name: yast2 -Version: 5.0.3 +Version: 5.0.4 Release: 0 Summary: YaST2 Main Package