[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /lonnet/perl lonnet.pm
raeburn
raeburn at source.lon-capa.org
Thu Jul 3 10:59:02 EDT 2014
raeburn Thu Jul 3 14:59:02 2014 EDT
Modified files: (Branch: version_2_11_X)
/loncom/lonnet/perl lonnet.pm
Log:
- For 2.11
- Backport 1.1264
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1172.2.52 loncom/lonnet/perl/lonnet.pm:1.1172.2.53
--- loncom/lonnet/perl/lonnet.pm:1.1172.2.52 Wed Jun 25 18:44:10 2014
+++ loncom/lonnet/perl/lonnet.pm Thu Jul 3 14:59:01 2014
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.1172.2.52 2014/06/25 18:44:10 raeburn Exp $
+# $Id: lonnet.pm,v 1.1172.2.53 2014/07/03 14:59:01 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -11905,8 +11905,22 @@
# ------------------------------------------------------Get DNS checksums file
sub parse_dns_checksums_tab {
my ($lines,$hashref) = @_;
- my $machine_dom = &Apache::lonnet::host_domain($perlvar{'lonHostID'});
+ my $lonhost = $perlvar{'lonHostID'};
+ my $machine_dom = &Apache::lonnet::host_domain($lonhost);
my $loncaparev = &get_server_loncaparev($machine_dom);
+ my $distro = (split(/\:/,&get_server_distarch($lonhost)))[0];
+ my $webconfdir = '/etc/httpd/conf';
+ if ($distro =~ /^(ubuntu|debian)(\d+)$/) {
+ $webconfdir = '/etc/apache2';
+ } elsif ($distro =~ /^sles(\d+)$/) {
+ if ($1 >= 10) {
+ $webconfdir = '/etc/apache2';
+ }
+ } elsif ($distro =~ /^suse(\d+\.\d+)$/) {
+ if ($1 >= 10.0) {
+ $webconfdir = '/etc/apache2';
+ }
+ }
my ($release,$timestamp) = split(/\-/,$loncaparev);
my (%chksum,%revnum);
if (ref($lines) eq 'ARRAY') {
@@ -11915,6 +11929,11 @@
if ($version eq $release) {
foreach my $line (@{$lines}) {
my ($file,$version,$shasum) = split(/,/,$line);
+ if ($file =~ m{^/etc/httpd/conf}) {
+ if ($webconfdir eq '/etc/apache2') {
+ $file =~ s{^\Q/etc/httpd/conf/\E}{$webconfdir/};
+ }
+ }
$chksum{$file} = $shasum;
$revnum{$file} = $version;
}
More information about the LON-CAPA-cvs
mailing list