Skip to content

Commit

Permalink
simplify update_initrd
Browse files Browse the repository at this point in the history
on a system without transactional update, simply always call mkdumprd

/usr/sbin/tu-rebuild-kdump-initrd is going away; it does nothing
else than mkdumprd
(see openSUSE/transactional-update#107 )

It's always better to update the initrd from YaST than to leave it until next
reboot as kdump-early will then work since the very first boot.  No reason to
only do this if the fadump setting changed.

There is no reason to pass "-f" to mkdumprd. As the config file has just been
updated mkdumprd will always rebuild, even without "-f".
  • Loading branch information
jiribohac committed Jun 22, 2023
1 parent 7e80696 commit 4193cab
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/modules/Kdump.rb
Original file line number Diff line number Diff line change
Expand Up @@ -409,18 +409,9 @@ def update_initrd
# around
if Package.IsTransactionalSystem
return update_initrd_with("transactional-update --continue kdump")
else
return update_initrd_with("mkdumprd")
end

# For CaaSP we need an explicit initrd rebuild before the
# first boot, when the root filesystem becomes read only.
rebuild_cmd = "/usr/sbin/tu-rebuild-kdump-initrd"
# part of transactional-update.rpm
update_initrd_with("if test -x #{rebuild_cmd}; then #{rebuild_cmd}; fi")

return true unless using_fadump_changed?

update_command = "/usr/sbin/mkdumprd -f"
update_initrd_with(update_command)
end

# @param update_command [String] a command for .target.bash
Expand Down

0 comments on commit 4193cab

Please sign in to comment.