[Pkg-nagios-devel] Bug#1033791: check_running_kernel fails to find version on bookworm/arm64

Peter Palfrader weasel at debian.org
Sat Apr 1 11:25:34 BST 2023


On Sat, 01 Apr 2023, Peter Palfrader wrote:

> --- /usr/lib/nagios/plugins/check_running_kernel        2023-03-08 11:28:49.000000000 +0100
> +++ ./check_running_kernel      2023-04-01 11:35:33.643925332 +0200
> @@ -164,6 +164,8 @@
>         cat_vmlinux "$image" "\x89\x4c\x5a\x4f\x00\x0d\x0a\x1a"  "lzop -dc"  0
>         # zstd compressed image
>         cat_vmlinux "$image" "\x28\xb5\x2f\xfd"  "zstd -dc"  0

Hm.  Maybe guard this cat with it being able to find the linux version
string too:

Something like 
if strings "$image"  | grep -q 'Linux version'; then
> +
> +       cat "$image"
fi
> 

>         echo "ERROR: Unable to extract kernel image." 2>&1
>         exit 1

weasel
-- 
                            |  .''`.       ** Debian **
      Peter Palfrader       | : :' :      The  universal
 https://www.palfrader.org/ | `. `'      Operating System
                            |   `-    https://www.debian.org/



More information about the Pkg-nagios-devel mailing list