--- loncom/build/Attic/CHECKRPMS.default 2003/06/19 19:23:56 1.16 +++ loncom/build/Attic/CHECKRPMS.default 2003/07/30 16:49:27 1.17 @@ -119,6 +119,8 @@ my @rpms; # ---------------------------- my $goodoutput; # ------------------------------------ good stuff was returned! my $reallygoodoutput; # ------------------------------- you are 100% up-to-date +my $simplestatus='time='.time.'&'; + # ===================================================== Control flow of output. my $out = \*STDOUT; # Default: go to standard output (directly to terminal). @@ -264,11 +266,13 @@ END if (!$goodoutput) # If never received any useable output, assume "no server". { print($out '**** ERROR **** Cannot find a working ftp server.'."\n"); + $simplestatus.='status=fail'; clean_exit($mode,$out,0); } elsif ($reallygoodoutput) # Everything is peachy keen and up-to-date already. { print($out $reallygoodoutput); + $simplestatus.='status=okay'; } else # There are RPMs that need to be updated; show list to user. { @@ -279,6 +283,7 @@ the list below. THIS IS IMPORTANT FOR S END print($out $goodoutput); # Output the RPM list. + $simplestatus.='status=okay&rpmcount='.$rpmcount; if ($mode eq 'interactive') { print($out </home/httpd/html/lon-status/checkrpms.txt'); + print SMP $simplestatus."\n"; + close(SMP); +# +# Mail +# if ($mode eq 'cronmail') # If cronmail mode, then mail LON-CAPA sys admin. { close(FOUT);