[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

raeburn raeburn at source.lon-capa.org
Fri Feb 8 11:07:44 EST 2013


raeburn		Fri Feb  8 16:07:44 2013 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - Better way to retrieve Apache version for all supported distros (note
    SLES9 and RHEL4 still running 1.3).  
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1213 loncom/lonnet/perl/lonnet.pm:1.1214
--- loncom/lonnet/perl/lonnet.pm:1.1213	Thu Feb  7 13:59:14 2013
+++ loncom/lonnet/perl/lonnet.pm	Fri Feb  8 16:07:43 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1213 2013/02/07 13:59:14 raeburn Exp $
+# $Id: lonnet.pm,v 1.1214 2013/02/08 16:07:43 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -12197,15 +12197,17 @@
 	if ($test != 0) { $_64bit=1; } else { $_64bit=0; }
 	&logthis(" Detected 64bit platform ($_64bit)");
     }
-    if (open(PIPE,"httpd -V  2>&1 |")) {
-        while (<PIPE>) {
-            if (m{Apache/(\d+.\d+)}) {
-                $apache = $1;
-                last;
-            }
+
+    {
+        eval {
+            ($apache) =
+                (Apache2::ServerUtil::get_server_version() =~ m{Apache/(\d+\.\d+)});
+        };
+        if ($@) {
+           $apache = 1.3;
         }
-        close(PIPE);
     }
+
 }
 }
 




More information about the LON-CAPA-cvs mailing list