Skip to content

Commit

Permalink
Co-authored-by: Josef Reidinger <jreidinger@suse.cz>
Browse files Browse the repository at this point in the history
Changes based on CR
  • Loading branch information
teclator committed Jan 25, 2024
1 parent 1b0390b commit 98b1343
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/lib/installation/cio_ignore.rb
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def add_cio_boot_kernel_parameters
raise "cio_ignore -k failed with #{res["stderr"]}" if res["exit"] != 0

# boot code is already proposed and will be written in next step, so just modify
Yast::Bootloader.modify_kernel_params("cio_ignore" => res["stdout"].lines.first)
Yast::Bootloader.modify_kernel_params("cio_ignore" => res["stdout"].lines.first.strip)
end

ACTIVE_DEVICES_FILE = "/boot/zipl/active_devices.txt".freeze
Expand All @@ -263,13 +263,14 @@ def store_active_devices
devices_lines = res["stdout"].lines.grep(/^(?:\h.){0,2}\h{4}.*$/)

devices = devices_lines.map(&:chomp)
target_file = File.join(Yast::Installation.destdir, ACTIVE_DEVICES_FILE)

# make sure the file ends with a new line character
devices << "" unless devices.empty?
log.info "active devices to be written: #{devices.join(",")}"

File.write(target_file, devices.join("\n"))
devices_txt = devices.join("\n")
log.info "active devices to be written: #{devices_txt}"

target_file = File.join(Yast::Installation.destdir, ACTIVE_DEVICES_FILE)
File.write(target_file, devices_txt)
end
end
end

0 comments on commit 98b1343

Please sign in to comment.