Skip to content

Commit

Permalink
install_klp_product: Install kernel-default-livepatch on SLE Micro
Browse files Browse the repository at this point in the history
SLE Micro has livepatching included in the system core so there is
no separate livepatching product to install. Livepatches get enabled
by installing the kernel-default-livepatch package.
  • Loading branch information
mdoucha committed Feb 5, 2025
1 parent 31c9293 commit 148e498
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/klp.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use testapi;
use utils;
use version_utils qw(is_sle is_sle_micro);
use transactional;
use package_utils;

our @EXPORT = qw(
install_klp_product is_klp_pkg find_installed_klp_pkg klp_pkg_eq
Expand Down Expand Up @@ -57,7 +58,7 @@ sub install_klp_product {
assert_script_run 'sed -i "/^multiversion =.*/c\\multiversion = provides:multiversion(kernel)" /etc/zypp/zypp.conf';
assert_script_run 'sed -i "/^multiversion\.kernels =.*/c\\multiversion.kernels = latest" /etc/zypp/zypp.conf';
assert_script_run 'echo "LIVEPATCH_KERNEL=\'always\'" >> /etc/sysconfig/livepatching';
reboot_on_changes;
install_package('kernel-default-livepatch', trup_reboot => 1);
} else {
zypper_call("in -l -t product $lp_product", exitcode => [0, 102, 103]);
zypper_call("mr -e kgraft-update") unless $livepatch_repo;
Expand Down

0 comments on commit 148e498

Please sign in to comment.