Update check_running_kernel

This commit is contained in:
Thorsten Spille 2021-07-08 22:36:26 +02:00 committed by GitHub
parent a871827fc4
commit da58c7c46d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,7 @@ if [[ "$uname" == *"-pve" ]]; then
else else
filter=linux-image-$major_version filter=linux-image-$major_version
fi fi
latest_kernel=$(dpkg --get-selections | grep $filter | tail -1 | cut -f1 | cut -d'-' -f3-) latest_kernel=$(dpkg --get-selections | grep $filter | grep -v deinstall | tail -1 | cut -f1 | cut -d'-' -f3-)
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