version 1.11, 2002/11/15 18:42:34
|
version 1.15, 2003/03/10 17:34:52
|
Line 195 SERVERLOOP: foreach my $serverpath (@ser
|
Line 195 SERVERLOOP: foreach my $serverpath (@ser
|
$FTPSERVER_noauth=~s/^.*?\@//; |
$FTPSERVER_noauth=~s/^.*?\@//; |
print($out |
print($out |
"Trying $FTPSERVER_noauth...\n"); # Notify of attempts with ip name. |
"Trying $FTPSERVER_noauth...\n"); # Notify of attempts with ip name. |
`ping -c 1 $FTPSERVER_noauth 2>/dev/null`; # Ping ftp server (you there?). |
`ping -c 1 -w 10 $FTPSERVER_noauth 2>/dev/null`;#Ping ftp server (u there?) |
if ($?==0) # If the ftp server can be pinged. |
if ($?==0) # If the ftp server can be pinged. |
{ |
{ |
print($out "$FTPSERVER found...\n"); # Tell user ftp server is found. |
print($out "$FTPSERVER found...\n"); # Tell user ftp server is found. |
Line 330 sub clean_exit
|
Line 330 sub clean_exit
|
delete $perlvar{'lonSqlAccess'}; # remove since sensitive |
delete $perlvar{'lonSqlAccess'}; # remove since sensitive |
|
|
# Set metadata for the e-mail. |
# Set metadata for the e-mail. |
my $emailto = "$perlvar{'lonAdmEMail'},$perlvar{'lonSysEMail'}"; |
my $emailto = "$perlvar{'lonAdmEMail'}"; |
|
|
my $subj=$perlvar{'lonHostID'}.', RPMS to upgrade'; |
my $subj=$perlvar{'lonHostID'}.', RPMS to upgrade'; |
|
|
Line 345 sub clean_exit
|
Line 345 sub clean_exit
|
} |
} |
|
|
# Send the e-mail. |
# Send the e-mail. |
system( |
my $date = `date +"\%e"`; # Always send a day after the "Ides" or after |
'metasend -b -t '.$emailto.' -s '. |
# the beginning of a month. (In other words, |
"'$subj' -f /tmp/CHECKRPMS.$$ -m text/plain"); |
# send an e-mail every two weeks regardless.) |
|
if (!$reallygoodoutput or |
|
$date == 2 or |
|
$date == 16) |
|
{ |
|
system( |
|
'metasend -b -t '.$emailto.' -s '. |
|
"'$subj' -f /tmp/CHECKRPMS.$$ -m text/plain"); |
|
} |
} |
} |
|
|
print($out <<END) if $mode eq 'html'; # If html mode, print ending tags. |
print($out <<END) if $mode eq 'html'; # If html mode, print ending tags. |