[LON-CAPA-cvs] cvs: doc /install/suse install.pl

raeburn lon-capa-cvs@mail.lon-capa.org
Fri, 29 Jul 2005 22:22:00 -0000


raeburn		Fri Jul 29 18:22:00 2005 EDT

  Modified files:              
    /doc/install/suse	install.pl 
  Log:
  Make default options (create user www, install-httpd_conf) consistent with fedora/redhat. Location of httpd.conf in suse is /etc/httpd/ not /etc/httpd/conf. Create conf directory for loncapa_apache.conf and loncapa.conf.
  
  
Index: doc/install/suse/install.pl
diff -u doc/install/suse/install.pl:1.2 doc/install/suse/install.pl:1.3
--- doc/install/suse/install.pl:1.2	Wed Jun 15 14:03:23 2005
+++ doc/install/suse/install.pl	Fri Jul 29 18:21:58 2005
@@ -2,7 +2,7 @@
 # The LearningOnline Network 
 # Fedora installation script
 #
-# $Id: install.pl,v 1.2 2005/06/15 18:03:23 albertel Exp $
+# $Id: install.pl,v 1.3 2005/07/29 22:21:58 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -35,7 +35,7 @@
 # note: The filehandle LOG is global.
 open LOG,">>loncapa_install.log" || die "Unable to open log file.\n";
 
-print LOG '$Id: install.pl,v 1.2 2005/06/15 18:03:23 albertel Exp $'."\n";
+print LOG '$Id: install.pl,v 1.3 2005/07/29 22:21:58 raeburn Exp $'."\n";
 
 # Some friendly subroutines
 sub die_if_nonempty {
@@ -75,12 +75,12 @@
 #  Define default behaviour   #
 #                             #
 ###############################
-my $make_www       = 0;
+my $make_www       = 1;
 my $install_pwauth = 1;
 my $setup_mysql    = 1;
 my $setup_mysql_permissions = 1;
 my $stop_services     = 0;
-my $install_httpd_conf = 0;
+my $install_httpd_conf = 1;
 my $download_loncapa  = 1;
 my $showhelp          = 0;
 
@@ -179,8 +179,6 @@
     &copy_httpd_conf();
 }
 
-#my $lctarball = 'loncapa-current.tar.gz';
-#my $lctarball = 'loncapa-fedora-current.tar.gz';
 my $lctarball = 'loncapa-suse-current.tar.gz';
 if ($download_loncapa) {
     &download_loncapa($lctarball);
@@ -230,7 +228,7 @@
 ###############################################
 sub build_and_install_mod_auth_external {
     my $num = &uid_of_www();
-    # Patch mod_auth_external
+    # Patch pwauth
     print_and_log("Building authentication system for LON-CAPA users.\n");
     my $patch = <<"ENDPATCH";
 148c148
@@ -244,11 +242,11 @@
 		      "when installing RedHat.\n");
 	die;
     }
-    &die_if_nonempty(`cd /tmp; tar zxf $instdir/mod_auth_external-2.1.15.tar.gz`,
-		     "Unable to extract mod_auth_external\n");
-    my $dir = "/tmp/mod_auth_external-2.1.15/pwauth";
+    &die_if_nonempty(`cd /tmp; tar zxf $instdir/pwauth-2.2.8.tar.gz`,
+		     "Unable to extract pwauth\n");
+    my $dir = "/tmp/pwauth-2.2.8";
     open PATCH, "| patch $dir/config.h" || 
-	die "Unable to start patch for mod_auth_external.  Halting\n";
+	die "Unable to start patch for pwauth.  Halting\n";
     print PATCH $patch;
     close PATCH;
     print_and_log("\n");
@@ -358,14 +356,17 @@
 ##
 ###############################################
 sub copy_httpd_conf {
-    print_and_log("Copying our httpd.conf to /etc/httpd/conf/httpd.conf\n");
-    copy "/etc/httpd/conf/httpd.conf","/etc/httpd/conf/httpd.conf.original";
-    copy "$instdir/httpd.conf","/etc/httpd/conf/httpd.conf";
-    chmod 0444,"/etc/httpd/conf/httpd.conf";
+    print_and_log("Copying our httpd.conf to /etc/httpd/httpd.conf\n");
+    copy "/etc/httpd/httpd.conf","/etc/httpd/httpd.conf.original";
+    copy "$instdir/httpd.conf","/etc/httpd/httpd.conf";
+    chmod 0444,"/etc/httpd/httpd.conf";
+    if (!-e "/etc/httpd/conf") {  # Make conf directory if missing
+        mkdir("/etc/httpd/conf",0755);
+        print_and_log("Created /etc/httpd/conf directory");
+    }
     print_and_log("\n");
 }
 
-
 ###############################################
 ##
 ## Retrieve the latest LON-CAPA release