Skip to content

Commit

Permalink
Update check_running_kernel
Browse files Browse the repository at this point in the history
Add Proxmox 8.1 support
  • Loading branch information
thorstenspille authored Dec 11, 2023
1 parent db23af0 commit 6cf7c6d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions running-kernel/check_running_kernel
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6cf7c6d

Please sign in to comment.