[LON-CAPA-cvs] cvs: loncom / loncron

raeburn raeburn at source.lon-capa.org
Sat Feb 2 09:42:01 EST 2013


raeburn		Sat Feb  2 14:42:01 2013 EDT

  Modified files:              
    /loncom	loncron 
  Log:
  - Fix typo in rev 1.96.
  - %perlvar is a global; no need to pass by ref to &write_checksums() 
  
  
Index: loncom/loncron
diff -u loncom/loncron:1.96 loncom/loncron:1.97
--- loncom/loncron:1.96	Sat Feb  2 00:22:30 2013
+++ loncom/loncron	Sat Feb  2 14:42:01 2013
@@ -2,7 +2,7 @@
 
 # Housekeeping program, started by cron, loncontrol and loncron.pl
 #
-# $Id: loncron,v 1.96 2013/02/02 00:22:30 raeburn Exp $
+# $Id: loncron,v 1.97 2013/02/02 14:42:01 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -752,16 +752,15 @@
 }
 
 sub write_checksums {
-    my ($perlvar) = @_;
-    return unless (ref($perlvar) eq 'HASH');
-    my $distro = &get_distro($perlvar->{'lonDaemons'});
+    my $distro = &get_distro($perlvar{'lonDaemons'});
     if ($distro) {
         print "Retrieving file version and checksumming.\n";
+        my $numchksums = 0;
         my ($chksumsref,$versionsref) =
-            &LONCAPA::Checksumming::get_checksums($distro,$perlvar->{'lonDaemons'},
-                                                  $perlvar->{'lonLib'},
-                                                  $perlvar->{'lonIncludes'},
-                                                  $perlvar->{'lonTabDir'});
+            &LONCAPA::Checksumming::get_checksums($distro,$perlvar{'lonDaemons'},
+                                                  $perlvar{'lonLib'},
+                                                  $perlvar{'lonIncludes'},
+                                                  $perlvar{'lonTabDir'});
         if (ref($chksumsref) eq 'HASH') {
             $numchksums = scalar(keys(%{$chksumsref}));
         }
@@ -769,7 +768,7 @@
     } else {
         print "File version retrieval and checksumming skipped - could not determine Linux distro.\n"; 
     }
-    return'
+    return;
 }
 
 sub send_mail {
@@ -937,7 +936,7 @@
 	&log_simplestatus();
         &write_loncaparevs();
         &write_serverhomeIDs();
-	&write_checksums(\%perlvar);
+	&write_checksums();
 	if ($totalcount>200 && !$noemail) { &send_mail(); }
     }
 }




More information about the LON-CAPA-cvs mailing list