From 0138c2541052913e0ebd1406db87b95732784e6c Mon Sep 17 00:00:00 2001 From: Stephen L Johnson Date: Fri, 10 May 2002 20:15:19 +0000 Subject: [PATCH] skip a $check if var is null string. --- src/lib/Spong/Client/plugins/check_processes | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/Spong/Client/plugins/check_processes b/src/lib/Spong/Client/plugins/check_processes index 5cafdba..85fd31f 100755 --- a/src/lib/Spong/Client/plugins/check_processes +++ b/src/lib/Spong/Client/plugins/check_processes @@ -6,7 +6,7 @@ $CHECKFUNCS{'processes'} = \&check_processes; # This routine checks processes running on the host and makes sure that # the important ones are running -# $Id: check_processes,v 1.5 2001/09/16 18:08:39 sljohnson Exp $ +# $Id: check_processes,v 1.6 2002/05/10 20:15:19 sljohnson Exp $ use Spong::SafeExec qw(safe_exec); @@ -18,6 +18,7 @@ sub check_processes { @plist = safe_exec($PS,30); foreach $check ( @JOBSWARN, @PROCSWARN ) { + next if $check eq ''; $cnt = 1; if ($check =~ /^([^:]+):(.*)$/o) { $cnt = $2; @@ -28,6 +29,7 @@ sub check_processes { else { $message .= join ('',@ret); } } foreach $check ( @JOBSCRIT, @PROCSCRIT ) { + next if $check eq ''; $cnt = 1; if ($check =~ /^([^:]+):(.*)$/o) { $cnt = $2; -- 2.30.2