From 3c5b121926859803d9b17f4d3c5d8069d741eded Mon Sep 17 00:00:00 2001 From: Sebastian Thorarensen <sebth@lysator.liu.se> Date: Fri, 18 Mar 2016 10:05:38 +0100 Subject: [PATCH] check_lysrdiff: Synchronize with Puppet repo --- check_lysrdiff | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/check_lysrdiff b/check_lysrdiff index 074e6fe..edc25f9 100755 --- a/check_lysrdiff +++ b/check_lysrdiff @@ -1,11 +1,11 @@ #!/bin/sh # -# This check script is maintained in a Subversion repository at -# http://lsvn.lysator.liu.se/svnroot/nagios-plugins. Contact +# This check script is maintained in a Git repository at +# https://git.lysator.liu.se/lysator/nagios-plugins. Contact # <ceder@lysator.liu.se> for commit access. activity=26 -stale=40 +stale=120 usage () { echo $0: usage: $0 '[ opt ] diskno partno' >&2 @@ -119,8 +119,8 @@ then fi ( sed -n 's/--fail$//p' $state; sed 's/--start$//' $state-stale; ) \ |awk 'BEGIN { sz = 0 } - NR > 1 && sz < 198 { printf ","; sz += 2 } - sz < 200 { printf " %s", $3; sz += length($3) } + NR > 1 && sz < 198 { printf ", "; sz += 2 } + sz < 200 { printf "%s", $3; sz += length($3) } END { if (sz >= 200) printf ", others" } ' \ |sed s'/, \([^,]*\)$/ and \1/' echo '. | activity='$ACTIVITY stale=$STALE failed=$FAILED @@ -138,8 +138,8 @@ then echo -n ": " sed -n 's/--fail$//p' $state \ |awk 'BEGIN { sz = 0 } - NR > 1 && sz < 198 { printf ","; sz += 2 } - sz < 200 { printf " %s", $3; sz += length($3) } + NR > 1 && sz < 198 { printf ", "; sz += 2 } + sz < 200 { printf "%s", $3; sz += length($3) } END { if (sz >= 200) printf ", others" } ' \ |sed s'/, \([^,]*\)$/ and \1/' echo '. | activity='$ACTIVITY stale=$STALE failed=$FAILED -- GitLab