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

raeburn raeburn@source.lon-capa.org
Thu, 05 May 2011 16:38:08 -0000


raeburn		Thu May  5 16:38:08 2011 EDT

  Modified files:              
    /doc/install/linux	install.pl 
  Log:
  - Support Scientific Linux 6.
     - use: system-config-firewall-tui to configure firewall
  - Only call &update_SuSEfirewall2_setup() if distro is SuSE or SLES.
  - Correct path for LC's httpd.conf for CentOS/Fedora/RHEL/Scientific   
  
  
Index: doc/install/linux/install.pl
diff -u doc/install/linux/install.pl:1.10 doc/install/linux/install.pl:1.11
--- doc/install/linux/install.pl:1.10	Sun Apr 24 22:44:50 2011
+++ doc/install/linux/install.pl	Thu May  5 16:38:07 2011
@@ -72,7 +72,7 @@
           &mt('Stopping execution.')."\n";
     exit;
 } else {
-    print LOG '$Id: install.pl,v 1.10 2011/04/24 22:44:50 raeburn Exp $'."\n";
+    print LOG '$Id: install.pl,v 1.11 2011/05/05 16:38:07 raeburn Exp $'."\n";
 }
 
 #
@@ -195,7 +195,7 @@
             $distro = 'centos'.$1;
             $updatecmd = 'yum install LONCAPA-prerequisites';
             $installnow = 'yum -y install LONCAPA-prerequisites';
-        } elsif ($versionstring =~ /Scientific Linux SL release ([\d.]+) /) {
+        } elsif ($versionstring =~ /Scientific Linux (SL )?release ([\d.]+) /) {
             my $ver = $1;
             $ver =~ s/\.\d+$//;
             $distro = 'scientific'.$ver;
@@ -490,12 +490,12 @@
     my $nrlstr = join('',@norunlevels);
     foreach my $type ('apache','mysql','ntp','cups','memcached') {
         my $service = $daemon{$type};
-        my $command = $checker_bin.' --list '.$service;
+        my $command = $checker_bin.' --list '.$service.' 2>/dev/null';
         if ($type eq 'cups') { 
             if ($distro =~ /^(?:debian|ubuntu)(\d+)/) {
                 my $version = $1;
                 if (($distro =~ /^ubuntu/) && ($version <= 8)) {
-                    $command = $checker_bin.' --list cupsys';
+                    $command = $checker_bin.' --list cupsys 2>/dev/null';
                 }
             }
         }
@@ -1264,7 +1264,9 @@
             }  
         }
     }
-    &update_SuSEfirewall2_setup($instdir);
+    if ($distro =~ /^(suse|sles)/) {
+        &update_SuSEfirewall2_setup($instdir);
+    }
 } else {
     &print_and_log(&mt('Skipping setting override for start-up order of services.')."\n");
 }
@@ -1290,9 +1292,13 @@
                 }
             }
         }
+    } elsif ($distro =~ /^scientific/) {
+        print &mt('Use [_1] to configure the firewall to allow access for [_2].',
+                  'system-config-firewall-tui -- Customize',
+                  'ssh, http')."\n";
     } else {
         print &mt('Use [_1] to configure the firewall to allow access for [_2].',
-                  'setup -- Firewall confiuration -> Customize',
+                  'setup -- Firewall configuration -> Customize',
                   'ssh, http, https')."\n";
     }
 } else {
@@ -1504,7 +1510,7 @@
                             if (($distro =~ /^ubuntu/) && ($version <= 8)) {
                                 $daemon = 'cupsys';
                             }
-                        } elsif ($distro =~ /^(?:suse|sles)/) {
+                        } elsif ($distro =~ /^(?:suse|sles|scientific)/) {
                             $daemon = 'cups';
                         }
                     }
@@ -1664,7 +1670,7 @@
     print_and_log(&mt('Copying the LON-CAPA [_1] to [_2].',"'httpd.conf'",
                   "'/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";
+    copy "$instdir/centos-rhes-fedora-sl/httpd.conf","/etc/httpd/conf/httpd.conf";
     chmod(0444,"/etc/httpd/conf/httpd.conf");
     print_and_log("\n");
 }