diff --git a/service/lib/agama/autoyast/bootloader_reader.rb b/service/lib/agama/autoyast/bootloader_reader.rb index d1ddf8d143..7501ffee18 100644 --- a/service/lib/agama/autoyast/bootloader_reader.rb +++ b/service/lib/agama/autoyast/bootloader_reader.rb @@ -42,8 +42,17 @@ def read return {} if global.empty? bootloader = {} - bootloader["timeout"] = global["timeout"] if global["timeout"].is_a?(Integer) + + if global["timeout"].is_a?(Integer) + if global["timeout"] >= 0 + bootloader["timeout"] = global["timeout"] + else + bootloader["stopOnBootMenu"] = true + end + end + bootloader["extraKernelParams"] = global["append"] unless global["append"].to_s.empty? + { "bootloader" => bootloader } end diff --git a/service/package/rubygem-agama-yast.changes b/service/package/rubygem-agama-yast.changes index e8a727745f..4413adc4ef 100644 --- a/service/package/rubygem-agama-yast.changes +++ b/service/package/rubygem-agama-yast.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon May 26 09:44:54 UTC 2025 - Imobach Gonzalez Sosa + +- Set stopOnBootMenu to "true" when a negative timeout is + set in the bootloader section of an AutoYaST profile + (bsc#1243623). + ------------------------------------------------------------------- Fri May 23 12:37:31 UTC 2025 - José Iván López González diff --git a/service/test/agama/autoyast/bootloader_reader_test.rb b/service/test/agama/autoyast/bootloader_reader_test.rb index 038a42d3d9..723ba50ccb 100644 --- a/service/test/agama/autoyast/bootloader_reader_test.rb +++ b/service/test/agama/autoyast/bootloader_reader_test.rb @@ -64,6 +64,18 @@ "timeout" => 5 ) end + + context "and it is a negative number" do + let(:global) do + { "timeout" => -1 } + end + + it "sets the 'stopOnBootMenu' to 'true'" do + expect(subject.read["bootloader"]).to include( + "stopOnBootMenu" => true + ) + end + end end end end