[LON-CAPA-cvs] cvs: loncom / loncron
raeburn
raeburn at source.lon-capa.org
Sat Jan 11 16:54:31 EST 2020
raeburn Sat Jan 11 21:54:31 2020 EDT
Modified files:
/loncom loncron
Log:
- Format for logging change in IP address of a LON-CAPA host in network is:
| <hostname> | <previous IP> | <new IP> |
Index: loncom/loncron
diff -u loncom/loncron:1.119 loncom/loncron:1.120
--- loncom/loncron:1.119 Thu Jul 18 18:28:40 2019
+++ loncom/loncron Sat Jan 11 21:54:31 2020
@@ -2,7 +2,7 @@
# Housekeeping program, started by cron, loncontrol and loncron.pl
#
-# $Id: loncron,v 1.119 2019/07/18 18:28:40 raeburn Exp $
+# $Id: loncron,v 1.120 2020/01/11 21:54:31 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1096,12 +1096,12 @@
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)) {
unless ($currhosts{$key} eq $prevhosts{$key}) {
- $ipchange{$key} = $prevhosts{$key}.' | '.$currhosts{$key};
+ $ipchange{$key} = $prevhosts{$key}.' | '.$currhosts{$key}.' |';
}
}
}
@@ -1109,7 +1109,7 @@
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".
+ "Hostname | Previous IP | New IP |\n".
"--------------------------------\n";
foreach my $hostname (sort(keys(%ipchange))) {
print $fh "$hostname | $ipchange{$hostname}\n";
@@ -1127,7 +1127,7 @@
"MIME-Version: 1.0\n\n".
"Host/IP changes\n".
" \n".
- "Hostname | Previous IP | New IP\n".
+ "Hostname | Previous IP | New IP |\n".
"--------------------------------\n";
foreach my $hostname (sort(keys(%ipchange))) {
$chgmail .= "$hostname | $ipchange{$hostname}\n";
More information about the LON-CAPA-cvs
mailing list