-nagios-plugins-local (0.22~test.1) UNRELEASED; urgency=medium
+nagios-plugins-local (0.22) unstable; urgency=medium
* New version of check_mqtt, from https://github.com/jpmens/check-mqtt/
This adds python3 support and works with buster.
+ * Merge in check_running_kernel changes from 35.20210511
- -- Michael Howe <michael@michaelhowe.org> Sat, 09 Jan 2021 14:35:02 +0000
+ -- Michael Howe <michael@michaelhowe.org> Wed, 02 Jun 2021 22:21:26 +0100
nagios-plugins-local (0.21) unstable; urgency=medium
local imagename=0
# --no-all-versions show shows only the candidate
- for vers in $(apt-cache --no-all-versions show ${prefix}-image-${metavers} | sed -n 's/^Depends: //p' | tr ',' '\n' | tr -d ' ' | grep ${prefix}-image | awk '{print $1}' | sort -Vu); do
+ for vers in $(apt-cache --no-all-versions show ${prefix}-image-${metavers} | sed -n 's/^Depends: //p' | sed -e 's/ (.*)$//' | tr ',' '\n' | tr -d ' ' | grep ${prefix}-image | awk '{print $1}' | sort -Vu); do
if dpkg --compare-versions "1.$vers" gt "1.$imagename"; then
imagename=$vers
fi
filter="$3"
hdroff="$4"
- if ! which $filter >/dev/null; then
- echo "UNKNOWN: filter command '$filter' missing, perhaps install xz-utils?" >&2
+ if ! which ${filter%% *} >/dev/null; then
+ echo "UNKNOWN: filter command '$filter' missing, perhaps install xz-utils, lz4 or lzop?" >&2
exit $UNKNOWN
fi
cat_vmlinux "$image" "\x00\x00\x00\x02\xff" "xzcat" -1
cat_vmlinux "$image" "\x00\x00\x00\x04\xff" "xzcat" -1
# xz compressed image
- cat_vmlinux "$image" "\xfd\x37\x7a\x58\x5a " "xzcat" 0
+ cat_vmlinux "$image" "\xfd\x37\x7a\x58\x5a" "xzcat" 0
+ # lz4 compressed image
+ cat_vmlinux "$image" "\x02\x21\x4c\x18" "lz4 -dc" 0
+ # lzo compressed image
+ cat_vmlinux "$image" "\x89\x4c\x5a\x4f\x00\x0d\x0a\x1a" "lzop -dc" 0
echo "ERROR: Unable to extract kernel image." 2>&1
exit 1
searched=""
for on_disk in \
- $([ -f "/boot/vmlinuz-$(uname -r)" ] && find /boot/ -name 'vmlinuz*' -and -name "vmlinuz-$(uname -r)" -or -name 'vmlinuz*' -and -newer "/boot/vmlinuz-$(uname -r)" | sort -V) \
- $([ -f "/boot/kfreebsd-$(uname -r).gz" ] && find /boot/ -name 'kfreebsd*' -and -name "kfreebsd-$(uname -r).gz" -or -name 'kfreebsd*' -and -newer "/boot/kfreebsd-$(uname -r).gz" | sort -V); do
+ $([ -f "/boot/vmlinuz-$(uname -r)" ] && find /boot/ -maxdepth 1 -name 'vmlinuz*' -and -name "vmlinuz-$(uname -r)" -or -name 'vmlinuz*' -and -newer "/boot/vmlinuz-$(uname -r)" | sort -V) \
+ $([ -f "/boot/kfreebsd-$(uname -r).gz" ] && find /boot/ -maxdepth 1 -name 'kfreebsd*' -and -name "kfreebsd-$(uname -r).gz" -or -name 'kfreebsd*' -and -newer "/boot/kfreebsd-$(uname -r).gz" | sort -V); do
if [ -e "$on_disk" ]; then
if [ -z "$STRINGS" ]; then