mirror of
https://github.com/bashclub/checkmk-monitoring-plugins.git
synced 2024-12-26 01:40:11 +01:00
Add support for clearfog base
This commit is contained in:
parent
d7daff3489
commit
1ff06c7239
@ -32,10 +32,16 @@ uname=$(uname -r)
|
|||||||
major_version=${uname:0:3}
|
major_version=${uname:0:3}
|
||||||
if [[ "$uname" == *"-pve" ]]; then
|
if [[ "$uname" == *"-pve" ]]; then
|
||||||
filter=pve-kernel-$major_version
|
filter=pve-kernel-$major_version
|
||||||
|
elif [[ "$uname" == *"-mvebu" ]]; then
|
||||||
|
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
|
||||||
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 $filter | grep -E "\sinstall" | sort -V | tail -1 | cut -f1 | cut -d'-' -f3-)
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$latest_kernel" == "$uname" ]]; then
|
if [[ "$latest_kernel" == "$uname" ]]; then
|
||||||
echo -e "0 \"Running Kernel\" version_ok=0;1;|running_kernel=$uname;;|latest_installed_kernel=$latest_kernel;; Currently running Kernel up-to-date - OK"
|
echo -e "0 \"Running Kernel\" version_ok=0;1;|running_kernel=$uname;;|latest_installed_kernel=$latest_kernel;; Currently running Kernel up-to-date - OK"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user