[LON-CAPA-cvs] cvs: loncom / lond
harris41
lon-capa-cvs@mail.lon-capa.org
Sat, 11 May 2002 21:24:57 -0000
harris41 Sat May 11 17:24:57 2002 EDT
Modified files:
/loncom lond
Log:
using LONCAPA::Configuration::read_conf
BUG 129
Index: loncom/lond
diff -u loncom/lond:1.79 loncom/lond:1.80
--- loncom/lond:1.79 Tue May 7 22:31:04 2002
+++ loncom/lond Sat May 11 17:24:56 2002
@@ -2,7 +2,7 @@
# The LearningOnline Network
# lond "LON Daemon" Server (port "LOND" 5663)
#
-# $Id: lond,v 1.79 2002/05/08 02:31:04 foxr Exp $
+# $Id: lond,v 1.80 2002/05/11 21:24:56 harris41 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -53,6 +53,7 @@
# 02/12 Gerd Kortemeyer
# 02/19 Matthew Hall
# 02/25 Gerd Kortemeyer
+# 05/11 Scott Harrison
###
# based on "Perl Cookbook" ISBN 1-56592-243-3
@@ -61,6 +62,9 @@
# HUPs
# uses IDEA encryption
+use lib '/home/httpd/lib/perl/';
+use LONCAPA::Configuration;
+
use IO::Socket;
use IO::File;
use Apache::File;
@@ -101,18 +105,11 @@
$SIG{'QUIT'}=\&catchexception;
$SIG{__DIE__}=\&catchexception;
-# ------------------------------------ Read httpd access.conf and get variables
-
-open (CONFIG,"/etc/httpd/conf/access.conf") || die "Can't read access.conf";
-
-while ($configline=<CONFIG>) {
- if ($configline =~ /PerlSetVar/) {
- my ($dummy,$varname,$varvalue)=split(/\s+/,$configline);
- chomp($varvalue);
- $perlvar{$varname}=$varvalue;
- }
-}
-close(CONFIG);
+# ------------------------------------------- Read access.conf and loncapa.conf
+&status("Read access.conf and loncapa.conf");
+my $perlvarref=LONCAPA::Configuration::read_conf('access.conf','loncapa.conf');
+my %perlvar=%{$perlvarref};
+undef $perlvarref;
# ----------------------------- Make sure this process is running from user=www
my $wwwid=getpwnam('www');