| 1 |
Index: pkg-nagios-plugins-contrib/dsa/checks/dsa-check-running-kernel |
| 2 |
=================================================================== |
| 3 |
--- pkg-nagios-plugins-contrib.orig/dsa/checks/dsa-check-running-kernel |
| 4 |
+++ pkg-nagios-plugins-contrib/dsa/checks/dsa-check-running-kernel |
| 5 |
@@ -132,7 +132,7 @@ cat_vmlinux() { |
| 6 |
filter="$3" |
| 7 |
hdroff="$4" |
| 8 |
|
| 9 |
- if ! which $filter >/dev/null; then |
| 10 |
+ if ! which ${filter%% *} >/dev/null; then |
| 11 |
echo "UNKNOWN: filter command '$filter' missing, perhaps install xz-utils, lz4 or lzop?" >&2 |
| 12 |
exit $UNKNOWN |
| 13 |
fi |
| 14 |
@@ -157,7 +157,11 @@ get_image_linux() { |
| 15 |
cat_vmlinux "$image" "\x00\x00\x00\x02\xff" "xzcat" -1 |
| 16 |
cat_vmlinux "$image" "\x00\x00\x00\x04\xff" "xzcat" -1 |
| 17 |
# xz compressed image |
| 18 |
- cat_vmlinux "$image" "\xfd\x37\x7a\x58\x5a " "xzcat" 0 |
| 19 |
+ cat_vmlinux "$image" "\xfd\x37\x7a\x58\x5a" "xzcat" 0 |
| 20 |
+ # lz4 compressed image |
| 21 |
+ cat_vmlinux "$image" "\x02\x21\x4c\x18" "lz4 -dc" 0 |
| 22 |
+ # lzo compressed image |
| 23 |
+ cat_vmlinux "$image" "\x89\x4c\x5a\x4f\x00\x0d\x0a\x1a" "lzop -dc" 0 |
| 24 |
|
| 25 |
echo "ERROR: Unable to extract kernel image." 2>&1 |
| 26 |
exit 1 |