Index: pkg-nagios-plugins-contrib/dsa/checks/dsa-check-running-kernel
===================================================================
--- pkg-nagios-plugins-contrib.orig/dsa/checks/dsa-check-running-kernel
+++ pkg-nagios-plugins-contrib/dsa/checks/dsa-check-running-kernel
@@ -132,6 +132,11 @@ cat_vmlinux() {
 	filter="$3"
 	hdroff="$4"
 
+	if ! which $filter >/dev/null; then
+		echo "UNKNOWN: filter command '$filter' missing, perhaps install xz-utils, lz4 or lzop?" >&2
+		exit $UNKNOWN
+	fi
+
 	get_offset "$image" $header | head -n 5 | while read off; do
 		(if [ "$off" != 0 ]; then
 		   dd ibs="$((off+hdroff))" skip=1 count=0
@@ -183,9 +188,8 @@ fi
 
 searched=""
 for on_disk in \
-	"/boot/vmlinuz-`uname -r`"\
-	"/boot/vmlinux-`uname -r`"\
-	"/boot/kfreebsd-`uname -r`.gz"; 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
@@ -197,12 +201,12 @@ for on_disk in \
 			if [ -x /usr/bin/lsb_release ] ; then
 				vendor=$(lsb_release -i -s)
 				if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
-					on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.]\+)//")
+					on_disk_version=$( echo $on_disk_version|sed -e "s/ ($vendor [[:alnum:]\.-]\+ [[:alnum:]\.-]\+)//")
 				fi
 			fi
-			[ -z "$on_disk_version" ] || break
+			[ -z "$on_disk_version" ] || continue
 			on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
-			[ -z "$on_disk_version" ] || break
+			[ -z "$on_disk_version" ] || continue
 
 			echo "UNKNOWN: Failed to get a version string from image $on_disk"
 			exit $UNKNOWN
