# HG changeset patch # User Matthias Förste # Date 1389610095 -3600 # Node ID 61e38b7745129c307f87bb6840352985b8e65eaa # Parent da8f9dd551949762f356ef083f347b349fd2621f sort nagios check results for check_lm_sensors diff -r da8f9dd55194 -r 61e38b774512 nagios-plugins-contrib/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios-plugins-contrib/README Mon Jan 13 11:48:15 2014 +0100 @@ -0,0 +1,12 @@ +$ git clone git://git.debian.org/pkg-nagios/pkg-nagios-plugins-contrib +$ cd pkg-nagios-plugins-contrib/ +# aktuellen tag bestimmen und auschecken +pkg-nagios-plugins-contrib$ apt-cache policy nagios-plugins-contrib +pkg-nagios-plugins-contrib$ git checkout debian/4.20120702 +pkg-nagios-plugins-contrib$ export QUILT_PATCHES='debian/patches' +pkg-nagios-plugins-contrib$ quilt import -P check_lm_sensors/sort_results ~/src/hg/ius-diffs/nagios-plugins-contrib/sort_results.patch +# für die wheezy version 4.20120702 gab es einen +nmu1 postfix, besser wäre +# aber ius gewesen +pkg-nagios-plugins-contrib$ dch -lius 'Non-maintainer upload.' +pkg-nagios-plugins-contrib$ dch -D 'stable' --force-d --append 'sort check_lm_sensors results' +pkg-nagios-plugins-contrib$ $FAVOURITE-PACKAGE-BUILDER diff -r da8f9dd55194 -r 61e38b774512 nagios-plugins-contrib/sort_results.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios-plugins-contrib/sort_results.patch Mon Jan 13 11:48:15 2014 +0100 @@ -0,0 +1,46 @@ +--- a/check_lm_sensors/src/check_lm_sensors ++++ b/check_lm_sensors/src/check_lm_sensors +@@ -501,8 +501,9 @@ if ($sensors) { + # perform checks + + # old style checks +-while ( ( $name, $limits ) = each %checks ) { ++for $name ( sort keys %checks ) { + ++ $limits = $checks{$name}; + $converted_name = $name; + $converted_name =~ s/_/\ /gmx; + +@@ -541,8 +542,9 @@ while ( ( $name, $limits ) = each %checks ) { + } + + # lows +-while ( ( $name, $limits ) = each %lows ) { ++for $name ( sort keys %lows ) { + ++ $limits = $lows{$name}; + $converted_name = $name; + $converted_name =~ s/_/\ /gmx; + +@@ -575,8 +577,9 @@ while ( ( $name, $limits ) = each %lows ) { + } + + # highs +-while ( ( $name, $limits ) = each %highs ) { ++for $name ( sort keys %highs ) { + ++ $limits = $highs{$name}; + $converted_name = $name; + $converted_name =~ s/_/\ /gmx; + +@@ -610,8 +613,9 @@ while ( ( $name, $limits ) = each %highs ) { + } + + # ranges +-while ( ( $name, $limits ) = each %ranges ) { ++for $name ( sort keys %ranges ) { + ++ $limits = $ranges{$name}; + $converted_name = $name; + $converted_name =~ s/_/\ /gmx; +