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

matthew lon-capa-cvs@mail.lon-capa.org
Tue, 02 Jul 2002 13:46:15 -0000


matthew		Tue Jul  2 09:46:15 2002 EDT

  Modified files:              
    /doc/install/redhat7.3	install.pl 
  Log:
  Added Apache & Openssh upgrades.  Fixed language dependence in check to see
  if mysqld is running.
  
  
Index: doc/install/redhat7.3/install.pl
diff -u doc/install/redhat7.3/install.pl:1.3 doc/install/redhat7.3/install.pl:1.4
--- doc/install/redhat7.3/install.pl:1.3	Thu Jun 27 16:45:36 2002
+++ doc/install/redhat7.3/install.pl	Tue Jul  2 09:46:15 2002
@@ -2,7 +2,7 @@
 # The LearningOnline Network 
 # Red Hat 7.3 installation script
 #
-# $Id: install.pl,v 1.3 2002/06/27 20:45:36 matthew Exp $
+# $Id: install.pl,v 1.4 2002/07/02 13:46:15 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -162,6 +162,21 @@
 # This list of rpms needs to be pared down to some extent.
 #
 
+my @apache_rpms = (
+             "$instdir/apache-1.3.23-14.i386.rpm"
+                   );
+
+my @openssh_rpms = (
+             "$instdir/openssh-3.1p1-6.i386.rpm",
+             "$instdir/openssh-askpass-3.1p1-6.i386.rpm",
+             "$instdir/openssh-clients-3.1p1-6.i386.rpm",
+             "$instdir/openssh-server-3.1p1-6.i386.rpm"
+                );
+# Check for gnome-askpass installation.
+if (-e "/etc/profile.d/gnome-ssh-askpass.sh") {
+    push @openssh_rpms,"$instdir/openssh-askpass-gnome-3.1p1-6.i386.rpm";
+}
+
 my @ImageMagick_rpms = (
              "$instdir/ImageMagick-5.4.3.11-1.i386.rpm",
              "$instdir/ImageMagick-devel-5.4.3.11-1.i386.rpm",
@@ -200,6 +215,12 @@
 ## but it is an exercise in frustration.  It would be nice to be kind, but
 ## frankly I do not want to spend the time to figure this out.
 ##
+
+print_and_log("Installing Apache packages.\n");
+writelog (`rpm -Uvh @apache_rpms`);
+print_and_log("Installing openssh packages.\n");
+writelog (`rpm -Uvh @openssh_rpms`);
+system("/etc/init.d/sshd start");
 print_and_log("Installing ImageMagick packages.\n");
 writelog (`rpm -ivh --force --nodeps @ImageMagick_rpms`);
 print_and_log("Installing mysql packages.\n");
@@ -212,7 +233,6 @@
 writelog (`rpm -ivh --force --nodeps @perl_rpms`);
 print_and_log("Installing misc packages.\n");
 writelog (`rpm -ivh --force --nodeps @misc_rpms`);
-system("/etc/init.d/sshd start");
 print_and_log("\n");
 
 ##
@@ -315,8 +335,11 @@
 writelog(`/etc/rc.d/init.d/mysqld start`);
 print_and_log("Waiting for mysql daemon to start.\n");
 sleep 5;
-if (`/etc/rc.d/init.d/mysqld status` !~ / is running/) {
+my $status = system("/etc/rc.d/init.d/mysqld status");
+if ($status != 0) {
     die "Unable to start mysql daemon\nHalting\n";
+} else {
+    print_and_log("Mysql daemon is running.\n");
 }
 print_and_log("\n");
 
@@ -460,3 +483,4 @@
 }
 
 close LOG;
+