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

raeburn raeburn at source.lon-capa.org
Thu May 25 22:18:11 EDT 2017


raeburn		Fri May 26 02:18:11 2017 EDT

  Modified files:              
    /doc/install/linux	install.pl 
  Log:
  - Support SLES12 SP2.
  
  
Index: doc/install/linux/install.pl
diff -u doc/install/linux/install.pl:1.41 doc/install/linux/install.pl:1.42
--- doc/install/linux/install.pl:1.41	Wed Mar 29 22:52:04 2017
+++ doc/install/linux/install.pl	Fri May 26 02:18:11 2017
@@ -72,7 +72,7 @@
           &mt('Stopping execution.')."\n";
     exit;
 } else {
-    print LOG '$Id: install.pl,v 1.41 2017/03/29 22:52:04 raeburn Exp $'."\n";
+    print LOG '$Id: install.pl,v 1.42 2017/05/26 02:18:11 raeburn Exp $'."\n";
 }
 
 #
@@ -467,6 +467,8 @@
     } elsif ($distro =~ /^sles(\d+)/) {
         if ($1 >= 12) {
             $use_systemctl = 1;
+            $proc_owner = 'mysql';
+            $process = 'mysqld';
         }
     } elsif ($distro =~ /^suse(\d+)/) {
         if ($1 >= 13) {
@@ -1787,21 +1789,27 @@
 sub setup_mysql_permissions {
     my ($dbh,$has_pass, at mysql_lc_commands) = @_;
     my ($mysqlversion,$mysqlsubver,$mysqlname) = &get_mysql_version();
-    my ($usesauth, at mysql_commands);
+    my ($usesauth,$hasauthcol, at mysql_commands);
     if ($mysqlname =~ /^MariaDB/i) {
         if ($mysqlversion >= 10.2) {
             $usesauth = 1;
+        } elsif ($mysqlversion >= 5.5) {
+            $hasauthcol = 1;
         }
     } else {
         if (($mysqlversion > 5.7) || (($mysqlversion == 5.7) && ($mysqlsubver > 5))) {
             $usesauth = 1;
+        } elsif (($mysqlversion >= 5.6) || (($mysqlversion == 5.5) && ($mysqlsubver >= 7))) {
+            $hasauthcol = 1;
         }
     }
     if ($usesauth) {
         @mysql_commands = ("INSERT user (Host, User, ssl_cipher, x509_issuer, x509_subject) VALUES('localhost','www','','','')",
                          "ALTER USER 'www'\@'localhost' IDENTIFIED BY 'localhostkey'");
+    } elsif ($hasauthcol) {
+        @mysql_commands = ("INSERT user (Host, User, Password, ssl_cipher, x509_issuer, x509_subject, authentication_string) VALUES('localhost','www',password('localhostkey'),'','','','');");
     } else {
-        @mysql_commands = ("INSERT user (Host, User, Password) VALUES('localhost','www',password('localhostkey'));");
+        @mysql_commands = ("INSERT user (Host, User, Password, ssl_cipher, x509_issuer, x509_subject) VALUES('localhost','www',password('localhostkey'),'','','');");
     }
     if ($mysqlversion < 4) {
         push (@mysql_commands,"




More information about the LON-CAPA-cvs mailing list