--- loncom/configuration/Checksumming.pm 2013/02/02 15:20:02 1.2 +++ loncom/configuration/Checksumming.pm 2013/02/08 15:14:22 1.5 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Checksum installed LON-CAPA modules and some configuration files # -# $Id: Checksumming.pm,v 1.2 2013/02/02 15:20:02 raeburn Exp $ +# $Id: Checksumming.pm,v 1.5 2013/02/08 15:14:22 raeburn Exp $ # # The LearningOnline Network with CAPA # @@ -85,7 +85,7 @@ sub get_checksums { } if (@paths) { my $pathstr = join (' ',@paths); - if (open($dirh,"grep '$revtag' $pathstr |")) { + if (open($dirh,"grep '$revtag' $pathstr 2>&1 |")) { while (my $line=<$dirh>) { if ($line =~ m{^([^#]+):#\s\\s[\w.]+,v\s([\d.]+)\s}) { $versions{$1} = $2; @@ -125,11 +125,14 @@ sub get_checksums { sub compare_checksums { my ($target,$lonhost,$version,$serversums,$serverversions) = @_; my ($message,$numchg,$linefeed); - if ($target = 'web') { + if ($target eq 'web') { $linefeed = '
'; } else { $linefeed = "\n"; } + if (!$Apache::lonlocal::lh) { + &Apache::lonlocal::get_language_handle(); + } if ((ref($serversums) eq 'HASH') && (keys(%{$serversums}))) { my $checksums = &Apache::lonnet::fetch_dns_checksums(); my (%extra,%missing,%diffs,%stdsums,%stdversions); @@ -148,8 +151,10 @@ sub compare_checksums { $numchg ++; } } else { - $missing{$key} = 1; - $numchg ++; + unless ((-e $key) && (-B $key)) { + $missing{$key} = 1; + $numchg ++; + } } } foreach my $key (keys(%{$serversums})) {