Skip to content

Commit

Permalink
add_custom_grub_entries: Check again for purge-kernels
Browse files Browse the repository at this point in the history
Missing purge-kernels can be misleading (it's not e.g. on Micro).
Let's check again for the binary before running it (as it was before
7af63e2).

Signed-off-by: Petr Vorel <[email protected]>
  • Loading branch information
pevik committed Aug 21, 2024
1 parent 3fed221 commit efa55ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/bootloader_setup.pm
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ sub add_custom_grub_entries {
$distro = "SLES" . ' \\?' . get_required_var('VERSION');
}

bmwqemu::diag("Trying to trigger purging old kernels before changing grub menu");
script_run('/sbin/purge-kernels');
bmwqemu::diag("Trying to trigger purging old kernels before changing grub menu (if /sbin/purge-kernels installed)");
script_run('[ -x /sbin/purge-kernels ] && /sbin/purge-kernels');

assert_script_run("cp " . GRUB_CFG_FILE . " $cfg_old");
upload_logs($cfg_old, failok => 1);
Expand Down

0 comments on commit efa55ff

Please sign in to comment.