[interchange-cvs] interchange - racke modified scripts/interchange.PL
interchange-core@icdevgroup.org
interchange-core@icdevgroup.org
Fri Aug 2 07:42:01 2002
User: racke
Date: 2002-08-02 11:41:02 GMT
Modified: scripts interchange.PL
Log:
don't send email and/or write log entry if cron job returns
Revision Changes Path
2.48 +8 -3 interchange/scripts/interchange.PL
rev 2.48, prev_rev 2.47
Index: interchange.PL
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /anon_cvs/repository/interchange/scripts/interchange.PL,v
retrieving revision 2.47
retrieving revision 2.48
diff -u -r2.47 -r2.48
--- interchange.PL 1 Aug 2002 19:03:43 -0000 2.47
+++ interchange.PL 2 Aug 2002 11:40:59 -0000 2.48
@@ -3,7 +3,7 @@
#
# Interchange version 4.9.2
#
-# $Id: interchange.PL,v 2.47 2002/08/01 19:03:43 mheins Exp $
+# $Id: interchange.PL,v 2.48 2002/08/02 11:40:59 racke Exp $
#
# Copyright (C) 1996-2002 Red Hat, Inc. and others.
# http://www.icdevgroup.org/
@@ -1549,9 +1549,14 @@
my $out =3D join "", @out;
$out =3D~ s/^\s+//;
$out =3D~ s/\s+$/\n/;
- $out .=3D full_dump() if $croncfg->{add_session};=20
-
+ $out .=3D full_dump() if $croncfg->{add_session};
+=09
close_cat();
+
+ # don't send email and/or write log entry if cron job returns
+ # no output (in spirit of the real cron)
+ return unless $out;
+=09
if(my $addr =3D $Vend::CronEmail || $croncfg->{email}) {
my $subject =3D $croncfg->{subject} || 'Interchange cron results for job=
: %s';
$subject =3D errmsg($subject, $job);