Skip to content

Commit

Permalink
check file exists
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Apr 23, 2024
1 parent da59773 commit 6b2a0f2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/lib/bootloader/systemdboot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,11 @@ def read
self.secure_boot = Systeminfo.secure_boot_active?

lines = ""
File.open(File.join(Yast::Installation.destdir, CMDLINE)).each do |line|
lines =+ line
filename = File.join(Yast::Installation.destdir, CMDLINE)
if File.exists?(filename)
File.open(filename).each do |line|
lines =+ line
end
end
@kernel_container.kernel_params.replace(lines)
end
Expand Down

0 comments on commit 6b2a0f2

Please sign in to comment.