--- loncom/loncron 2019/08/01 18:21:36 1.103.2.5 +++ loncom/loncron 2020/01/11 22:39:55 1.103.2.6 @@ -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 @@ sub write_hostips { 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 @@ sub write_hostips { 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 @@ sub write_hostips { "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")) {