From baa4e172fd409665ef3ce220dc7592b05e2ce9f1 Mon Sep 17 00:00:00 2001 From: malachma Date: Mon, 6 Jul 2020 19:49:56 +0200 Subject: [PATCH] recover_suse replaced with a better working functionality to get the latest kernel version --- src/linux/common/helpers/alar/alar-fki/initrd.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/linux/common/helpers/alar/alar-fki/initrd.sh b/src/linux/common/helpers/alar/alar-fki/initrd.sh index 91e7790..a7b7202 100644 --- a/src/linux/common/helpers/alar/alar-fki/initrd.sh +++ b/src/linux/common/helpers/alar/alar-fki/initrd.sh @@ -5,6 +5,8 @@ # recover_suse() { + kernel_type=$(uname -r | grep -q default && echo "kernel-default" || echo "kernel-azure") + kernel_version=$(zypper se -is ${kernel} | grep ${kernel} | awk '{print $7;exit}') kernel_version=$(sed -e "s/kernel-//" <<< $(rpm -q kernel --last | head -n 1 | cut -f1 -d' ')) mkinitrd /boot/initrd-"${kernel_version}" "$kernel_version" grub2-mkconfig -o /boot/grub2/grub.cfg