[Pkg-nagios-changes] [pkg-nagios-plugins-contrib] 21/24: Update dsa checks to recent git version 2300473

Jan Wagner waja at moszumanska.debian.org
Wed Dec 13 22:07:36 UTC 2017


This is an automated email from the git hooks/post-receive script.

waja pushed a commit to branch master
in repository pkg-nagios-plugins-contrib.

commit b21ae153b99f1f95a92a844c0c37208b978d77bd
Author: Jan Wagner <waja at cyconet.org>
Date:   Wed Dec 13 22:05:42 2017 +0100

    Update dsa checks to recent git version 2300473
---
 dsa/checks/dsa-check-dnssec-delegation  |  4 ++--
 dsa/checks/dsa-check-running-kernel     | 12 +++++++-----
 dsa/control                             |  2 +-
 dsa/sbin/dsa-update-apt-status          |  2 +-
 dsa/sbin/dsa-update-unowned-file-status |  2 +-
 5 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/dsa/checks/dsa-check-dnssec-delegation b/dsa/checks/dsa-check-dnssec-delegation
index e614bf2..65b48b0 100644
--- a/dsa/checks/dsa-check-dnssec-delegation
+++ b/dsa/checks/dsa-check-dnssec-delegation
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# Copyright (c) 2010, 2014, 2015 Peter Palfrader <peter at palfrader.org>
+# Copyright (c) 2010, 2014, 2015, 2017 Peter Palfrader <peter at palfrader.org>
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -77,7 +77,7 @@ sub get_tag_generic {
 		}
 
 		# for now only handle KSKs, i.e. keys with the SEP flag set
-		if ($type eq 'DNSKEY' && !($rr->is_sep)) {
+		if ($type eq 'DNSKEY' && !($rr->sep)) {
 			push @zsks, $tag;
 			next;
 		}
diff --git a/dsa/checks/dsa-check-running-kernel b/dsa/checks/dsa-check-running-kernel
index 80f45bf..aa6e35b 100644
--- a/dsa/checks/dsa-check-running-kernel
+++ b/dsa/checks/dsa-check-running-kernel
@@ -57,12 +57,14 @@ get_avail() {
 
 	# DSA uses kernel versions of the form 2.6.29.3-dsa-dl380-oldxeon, where
 	# Debian uses versions of the form 2.6.29-2-amd64
-	if [ "${kervers#3}" != "$kervers" ]; then
-		metavers=$(echo $kervers | sed -r -e 's/^3\.[0-9]+(\.[0-9])?+-[A-Za-z0-9\.]+-(.*)/\2/')
-	elif [ "${kervers//dsa}" != "$kervers" ]; then
-		metavers=$(echo $kervers | sed -r -e 's/^2\.(4|6)\.[0-9]+([\.0-9]+?)-(.*)/2.\1-\3/')
+	if [ "${kervers#2}" != "$kervers" ]; then
+		if [ "${kervers//dsa}" != "$kervers" ]; then
+			metavers=$(echo $kervers | sed -r -e 's/^2\.(4|6)\.[0-9]+([\.0-9]+?)-(.*)/2.\1-\3/')
+		else
+			metavers=$(echo $kervers | sed -r -e 's/^2\.(4|6)\.[0-9]+-[A-Za-z0-9\.]+-(.*)/2.\1-\2/')
+		fi
 	else
-		metavers=$(echo $kervers | sed -r -e 's/^2\.(4|6)\.[0-9]+-[A-Za-z0-9\.]+-(.*)/2.\1-\2/')
+		metavers=$(echo $kervers | sed -r -e 's/^[0-9]+\.[0-9]+(\.[0-9])?+-[A-Za-z0-9\.]+-(.*)/\2/')
 	fi
 
 	# Attempt to track back to a metapackage failed.  bail
diff --git a/dsa/control b/dsa/control
index 7d383b5..8296c28 100644
--- a/dsa/control
+++ b/dsa/control
@@ -17,4 +17,4 @@ Description: plugins from the Debian System Administrators
  * check_statusfile: deliver the content of a status file
    as check result
 Recommends: ruby | ruby-interpreter, openssl, libnet-dns-perl, binutils
-Version: 1c0b9ec
+Version: 2300473
diff --git a/dsa/sbin/dsa-update-apt-status b/dsa/sbin/dsa-update-apt-status
index 8a278ce..8eebe1a 100755
--- a/dsa/sbin/dsa-update-apt-status
+++ b/dsa/sbin/dsa-update-apt-status
@@ -63,7 +63,7 @@ fi
 # run apt-get update, retry a few times if it fails
 count=0
 while [ "$count" -lt "$UPDATE_RUNS" ]; do
-	apt-get update -qq >/dev/null >&2
+	flock -e /var/lib/apt/lists apt-get update -qq >/dev/null >&2
 	if [ "$?" = "0" ]; then break; fi
 	sleep $(( $RANDOM % 600 ))
 	count="$(( $count + 1 ))"
diff --git a/dsa/sbin/dsa-update-unowned-file-status b/dsa/sbin/dsa-update-unowned-file-status
index 1caaaeb..89ac5f6 100755
--- a/dsa/sbin/dsa-update-unowned-file-status
+++ b/dsa/sbin/dsa-update-unowned-file-status
@@ -31,7 +31,7 @@ if command -v ionice >/dev/null 2>&1; then
 	prefix="ionice -c 3 -t"  # idle priority, ignore errors
 fi
 
-$prefix find / -ignore_readdir_race \( -fstype proc -o -fstype sysfs \) -prune -o -nouser | head -n "$CUTOFF" > "$tmp"
+$prefix find / -ignore_readdir_race \( -fstype proc -o -fstype sysfs -o -fstype fdescfs -o -fstype autofs -o -fstype nfs4 \) -prune -o \( -nouser -print \) | head -n "$CUTOFF" > "$tmp"
 
 if [ -s "$tmp" ]; then
 	echo "WARN"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-nagios-plugins-contrib.git



More information about the Pkg-nagios-changes mailing list