Skip to content

Commit 6cf7c6d

Browse files
Update check_running_kernel
Add Proxmox 8.1 support
1 parent db23af0 commit 6cf7c6d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

running-kernel/check_running_kernel

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,22 @@ uname=$(uname -r)
3232
major_version=${uname:0:3}
3333
if [[ "$uname" == *"-pve" ]]; then
3434
if [[ "$(lsb_release -cs 2> /dev/null)" == "bookworm" ]]; then
35-
filter=proxmox-kernel-$major_version
35+
if [[ "$major-version" == "6.5" ]]; then
36+
filter="proxmox-kernel-${major_version}.*-signed"
37+
else
38+
filter="proxmox-kernel-${major_version}"
39+
fi
3640
else
37-
filter=pve-kernel-$major_version
41+
filter="pve-kernel-${major_version}"
3842
fi
3943
elif [[ "$uname" == *"-mvebu" ]]; then
4044
latest_kernel=$(dpkg -l | grep -m1 linux-image-current-mvebu | rev | cut -d ' ' -f2 | rev)
4145
else
42-
filter=linux-image-$major_version
46+
filter="linux-image-$major_version"
4347
fi
4448

4549
if [[ "$uname" != *"-mvebu" ]]; then
46-
latest_kernel=$(dpkg --get-selections | grep $filter | grep -E "\sinstall" | sort -V | tail -1 | cut -f1 | cut -d'-' -f3-)
50+
latest_kernel=$(dpkg --get-selections | grep -E $filter | grep -E "\sinstall" | sort -V | tail -1 | cut -f1 | cut -d'-' -f3-)
4751
fi
4852

4953
if [[ "$latest_kernel" == "$uname" ]]; then

0 commit comments

Comments
 (0)