From b197df06a2f5cd6837cff067a9f3f2a3d533d2c7 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Sun, 15 Jul 2012 17:31:57 +0100 Subject: [PATCH] this is probably a hack Signed-off-by: Stephen Gran --- dsa-nagios-checks/checks/dsa-check-statusfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dsa-nagios-checks/checks/dsa-check-statusfile b/dsa-nagios-checks/checks/dsa-check-statusfile index 6ca691d..4654731 100755 --- a/dsa-nagios-checks/checks/dsa-check-statusfile +++ b/dsa-nagios-checks/checks/dsa-check-statusfile @@ -74,8 +74,15 @@ if not returnvalue in NAGIOS_STATUS: print "UNKNOWN: %s has invalid return value: %s."%(statusfile, returnvalue) sys.exit(NAGIOS_STATUS['UNKNOWN']) +linecnt = 0 for line in status: print line, + linecnt += 1 + +if linecnt == 0: + print "Found no output. Something is probably wrong" + sys.exit(NAGIOS_STATUS['UNKNOWN']) + sys.exit(NAGIOS_STATUS[returnvalue]) # vim:set et: -- 2.20.1