From 6cf7c6df726b089bdcaa17d6ba34dc65dba9387c Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Mon, 11 Dec 2023 22:43:44 +0100 Subject: [PATCH] Update check_running_kernel Add Proxmox 8.1 support --- running-kernel/check_running_kernel | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/running-kernel/check_running_kernel b/running-kernel/check_running_kernel index 484b6e7..0d26075 100644 --- a/running-kernel/check_running_kernel +++ b/running-kernel/check_running_kernel @@ -32,18 +32,22 @@ uname=$(uname -r) major_version=${uname:0:3} if [[ "$uname" == *"-pve" ]]; then if [[ "$(lsb_release -cs 2> /dev/null)" == "bookworm" ]]; then - filter=proxmox-kernel-$major_version + if [[ "$major-version" == "6.5" ]]; then + filter="proxmox-kernel-${major_version}.*-signed" + else + filter="proxmox-kernel-${major_version}" + fi else - filter=pve-kernel-$major_version + filter="pve-kernel-${major_version}" fi elif [[ "$uname" == *"-mvebu" ]]; then latest_kernel=$(dpkg -l | grep -m1 linux-image-current-mvebu | rev | cut -d ' ' -f2 | rev) else - filter=linux-image-$major_version + filter="linux-image-$major_version" fi if [[ "$uname" != *"-mvebu" ]]; then - latest_kernel=$(dpkg --get-selections | grep $filter | grep -E "\sinstall" | sort -V | tail -1 | cut -f1 | cut -d'-' -f3-) + latest_kernel=$(dpkg --get-selections | grep -E $filter | grep -E "\sinstall" | sort -V | tail -1 | cut -f1 | cut -d'-' -f3-) fi if [[ "$latest_kernel" == "$uname" ]]; then