[LON-CAPA-cvs] cvs: doc /install/linux install.pl
raeburn
raeburn at source.lon-capa.org
Thu Aug 25 13:39:05 EDT 2016
raeburn Thu Aug 25 17:39:05 2016 EDT
Modified files:
/doc/install/linux install.pl
Log:
- Support MariaDB 10.0
Index: doc/install/linux/install.pl
diff -u doc/install/linux/install.pl:1.37 doc/install/linux/install.pl:1.38
--- doc/install/linux/install.pl:1.37 Tue Aug 9 15:20:45 2016
+++ doc/install/linux/install.pl Thu Aug 25 17:39:04 2016
@@ -72,7 +72,7 @@
&mt('Stopping execution.')."\n";
exit;
} else {
- print LOG '$Id: install.pl,v 1.37 2016/08/09 15:20:45 raeburn Exp $'."\n";
+ print LOG '$Id: install.pl,v 1.38 2016/08/25 17:39:04 raeburn Exp $'."\n";
}
#
@@ -1786,12 +1786,20 @@
sub setup_mysql_permissions {
my ($dbh,$has_pass, at mysql_lc_commands) = @_;
- my ($mysqlversion,$mysqlsubver) = &get_mysql_version();
+ my ($mysqlversion,$mysqlsubver,$mysqlname) = &get_mysql_version();
my ($usesauth, at mysql_commands);
- if (($mysqlversion > 5.7) || (($mysqlversion == 5.7) && ($mysqlsubver > 5))) {
+ if ($mysqlname =~ /^MariaDB/i) {
+ if ($mysqlversion >= 10.2) {
+ $usesauth = 1;
+ }
+ } else {
+ if (($mysqlversion > 5.7) || (($mysqlversion == 5.7) && ($mysqlsubver > 5))) {
+ $usesauth = 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'");
- $usesauth = 1;
+ "ALTER USER 'www'\@'localhost' IDENTIFIED BY 'localhostkey'");
} else {
@mysql_commands = ("INSERT user (Host, User, Password) VALUES('localhost','www',password('localhostkey'));");
}
@@ -1886,17 +1894,17 @@
}
sub get_mysql_version {
- my ($version,$subversion);
+ my ($version,$subversion,$name);
if (open(PIPE," mysql -V |")) {
my $info = <PIPE>;
chomp($info);
close(PIPE);
- ($version,$subversion) = ($info =~ /(\d+\.\d+)\.(\d+)[\-\w]*,/);
+ ($version,$subversion,$name) = ($info =~ /(\d+\.\d+)\.(\d+)\-?(\w*),/);
} else {
print &mt('Could not determine which version of MySQL is installed.').
"\n";
}
- return ($version,$subversion);
+ return ($version,$subversion,$name);
}
###########################################################
More information about the LON-CAPA-cvs
mailing list