From: Stephen L Johnson Date: Fri, 10 May 2002 20:15:19 +0000 (+0000) Subject: skip a $check if var is null string. X-Git-Tag: spong-2_7_7~7 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0138c2541052913e0ebd1406db87b95732784e6c;p=spong.git skip a $check if var is null string. --- 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;