version 1.1, 2013/02/02 00:22:34
|
version 1.3, 2013/05/13 01:16:23
|
Line 37 use LONCAPA::Configuration();
|
Line 37 use LONCAPA::Configuration();
|
use LONCAPA::loncgi(); |
use LONCAPA::loncgi(); |
use LONCAPA::lonauthcgi(); |
use LONCAPA::lonauthcgi(); |
use LONCAPA::Checksumming(); |
use LONCAPA::Checksumming(); |
|
use LONCAPA; |
|
|
my $perlvar=&LONCAPA::Configuration::read_conf('loncapa.conf'); |
my $perlvar=&LONCAPA::Configuration::read_conf('loncapa.conf'); |
my ($londaemons,$lonlib,$lonincludes,$lontabdir,$lonhost); |
my ($londaemons,$lonlib,$lonincludes,$lontabdir,$lonhost); |
Line 57 if ($londaemons ne '' && $lonlib ne '' &
|
Line 58 if ($londaemons ne '' && $lonlib ne '' &
|
|
|
sub main { |
sub main { |
my ($londaemons,$lonlib,$lonincludes,$lontabdir,$lonhost) = @_; |
my ($londaemons,$lonlib,$lonincludes,$lontabdir,$lonhost) = @_; |
if (!&LONCAPA::lonauthcgi::check_ipbased_access('checksums')) { |
if (&LONCAPA::lonauthcgi::check_ipbased_access('checksums')) { |
|
&LONCAPA::loncgi::check_cookie_and_load_env(); |
|
} else { |
if (!&LONCAPA::loncgi::check_cookie_and_load_env()) { |
if (!&LONCAPA::loncgi::check_cookie_and_load_env()) { |
&Apache::lonlocal::get_language_handle(); |
&Apache::lonlocal::get_language_handle(); |
print(&LONCAPA::loncgi::missing_cookie_msg()); |
print(&LONCAPA::loncgi::missing_cookie_msg()); |
Line 71 sub main {
|
Line 74 sub main {
|
} |
} |
} |
} |
|
|
&Apache::lonlocal::get_language_handle(); |
|
&print_differences($londaemons,$lonlib,$lonincludes,$lontabdir,$lonhost); |
&print_differences($londaemons,$lonlib,$lonincludes,$lontabdir,$lonhost); |
return; |
return; |
} |
} |
Line 81 sub print_differences {
|
Line 83 sub print_differences {
|
my $machine_dom = &Apache::lonnet::host_domain($lonhost); |
my $machine_dom = &Apache::lonnet::host_domain($lonhost); |
my $loncaparev = &Apache::lonnet::get_server_loncaparev($machine_dom); |
my $loncaparev = &Apache::lonnet::get_server_loncaparev($machine_dom); |
my ($version,$timestamp) = split(/\-/,$loncaparev); |
my ($version,$timestamp) = split(/\-/,$loncaparev); |
print(&Apache::loncommon::start_page('LON-CAPA code integrity checking')); |
&Apache::lonlocal::get_language_handle(); |
|
print(&Apache::loncommon::start_page('Code integrity check')); |
if ($loncaparev =~ /CVS_HEAD/) { |
if ($loncaparev =~ /CVS_HEAD/) { |
print(&Apache::lonlocal::mt('Code checking unavailable for LON-CAPA CVS HEAD'). |
print('<h3>'. |
"\n"); |
&Apache::lonlocal::mt('Code checking unavailable for LON-CAPA CVS HEAD'). |
|
'</h3>'); |
} else { |
} else { |
print('<h2>'. |
print('<h3>'. |
&Apache::lonlocal::mt('Code integrity check -- LONCAPA version: [_1]', |
&Apache::lonlocal::mt('Code integrity check -- LONCAPA version: [_1]', |
$version). |
$version). |
'</h2>'); |
'</h3>'); |
my $distro; |
my $distro = &LONCAPA::distro(); |
if (open(my $disth,"$londaemons/distprobe |")) { |
|
$distro = <$disth>; |
|
close($disth); |
|
} |
|
if ($distro) { |
if ($distro) { |
my ($serversums,$serverversions) = |
my ($serversums,$serverversions) = |
&LONCAPA::Checksumming::get_checksums($distro,$londaemons,$lonlib, |
&LONCAPA::Checksumming::get_checksums($distro,$londaemons,$lonlib, |