mirror of
https://github.com/bashclub/checkmk-monitoring-plugins.git
synced 2024-12-26 01:40:11 +01:00
Update check_running_kernel
Add Proxmox 8.1 support
This commit is contained in:
parent
db23af03dd
commit
6cf7c6df72
@ -32,18 +32,22 @@ uname=$(uname -r)
|
|||||||
major_version=${uname:0:3}
|
major_version=${uname:0:3}
|
||||||
if [[ "$uname" == *"-pve" ]]; then
|
if [[ "$uname" == *"-pve" ]]; then
|
||||||
if [[ "$(lsb_release -cs 2> /dev/null)" == "bookworm" ]]; 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
|
else
|
||||||
filter=pve-kernel-$major_version
|
filter="proxmox-kernel-${major_version}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
filter="pve-kernel-${major_version}"
|
||||||
fi
|
fi
|
||||||
elif [[ "$uname" == *"-mvebu" ]]; then
|
elif [[ "$uname" == *"-mvebu" ]]; then
|
||||||
latest_kernel=$(dpkg -l | grep -m1 linux-image-current-mvebu | rev | cut -d ' ' -f2 | rev)
|
latest_kernel=$(dpkg -l | grep -m1 linux-image-current-mvebu | rev | cut -d ' ' -f2 | rev)
|
||||||
else
|
else
|
||||||
filter=linux-image-$major_version
|
filter="linux-image-$major_version"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$uname" != *"-mvebu" ]]; then
|
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
|
fi
|
||||||
|
|
||||||
if [[ "$latest_kernel" == "$uname" ]]; then
|
if [[ "$latest_kernel" == "$uname" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user