Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion service/lib/agama/autoyast/bootloader_reader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions service/package/rubygem-agama-yast.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon May 26 09:44:54 UTC 2025 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

- 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 <jlopez@suse.com>

Expand Down
12 changes: 12 additions & 0 deletions service/test/agama/autoyast/bootloader_reader_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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