[LON-CAPA-cvs] cvs: loncom(version_2_11_X) / loncron

raeburn raeburn at source.lon-capa.org
Sat Jan 11 17:39:55 EST 2020


raeburn		Sat Jan 11 22:39:55 2020 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom	loncron 
  Log:
  - For 2.11
    Backport 1.120, 1.121
  
  
Index: loncom/loncron
diff -u loncom/loncron:1.103.2.5 loncom/loncron:1.103.2.6
--- loncom/loncron:1.103.2.5	Thu Aug  1 18:21:36 2019
+++ loncom/loncron	Sat Jan 11 22:39:55 2020
@@ -2,7 +2,7 @@
 
 # Housekeeping program, started by cron, loncontrol and loncron.pl
 #
-# $Id: loncron,v 1.103.2.5 2019/08/01 18:21:36 raeburn Exp $
+# $Id: loncron,v 1.103.2.6 2020/01/11 22:39:55 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -893,7 +893,7 @@
     if (keys(%prevhosts) && keys(%currhosts)) {
         foreach my $key (keys(%prevhosts)) {
             unless ($currhosts{$key} eq $prevhosts{$key}) {
-                $ipchange{$key} = $prevhosts{$key}.'|'.$currhosts{$key};
+                $ipchange{$key} = $prevhosts{$key}.' | '.$currhosts{$key};
             }
         }
         foreach my $key (keys(%currhosts)) {
@@ -906,10 +906,10 @@
         if (keys(%ipchange)) {
             if (open(my $fh,'>>',$perlvar{'lonDaemons'}.'/logs/hostip.log')) {
                print $fh "********************\n".localtime(time).' Changes --'."\n".
-                         "Hostname | Previous IP | New IP\n".
-                         "--------------------------------\n";
+                         "| Hostname | Previous IP | New IP |\n".
+                         " --------------------------------- \n";
                foreach my $hostname (sort(keys(%ipchange))) {
-                    print $fh "$hostname | $ipchange{$hostname}\n";
+                    print $fh "| $hostname | $ipchange{$hostname} |\n";
                 }
                 print $fh "\n*******************\n\n";
                 close($fh);
@@ -924,10 +924,10 @@
                               "MIME-Version: 1.0\n\n".
                               "Host/IP changes\n".
                               " \n".
-                              "Hostname | Previous IP | New IP\n".
-                              "--------------------------------\n";
+                              "| Hostname | Previous IP | New IP |\n".
+                              " --------------------------------- \n";
                 foreach my $hostname (sort(keys(%ipchange))) {
-                    $chgmail .= "$hostname | $ipchange{$hostname}\n";
+                    $chgmail .= "| $hostname | $ipchange{$hostname} |\n";
                 }
                 $chgmail .= "\n\n";
                 if (open(my $mailh, "|/usr/lib/sendmail -oi -t -odb")) {




More information about the LON-CAPA-cvs mailing list