Diff for /doc/install/linux/install.pl between versions 1.36 and 1.39

version 1.36, 2016/05/05 03:03:57 version 1.39, 2016/08/28 16:15:53
Line 454  sub check_mysql_running { Line 454  sub check_mysql_running {
             $proc_owner = 'mysql';              $proc_owner = 'mysql';
             $use_systemctl = 1;              $use_systemctl = 1;
         }          }
           if ($1 >= 19) {
               $mysqldaemon ='mariadb';
           }
     } elsif ($distro =~ /^(?:centos|rhes|scientific)(\d+)/) {      } elsif ($distro =~ /^(?:centos|rhes|scientific)(\d+)/) {
         if ($1 >= 7) {          if ($1 >= 7) {
             $mysqldaemon ='mariadb';              $mysqldaemon ='mariadb';
Line 574  sub chkconfig { Line 577  sub chkconfig {
             $uses_systemctl{'memcached'} = 1;              $uses_systemctl{'memcached'} = 1;
             $uses_systemctl{'cups'} = 1;              $uses_systemctl{'cups'} = 1;
         }          }
           if ($version >= 19) {
               $daemon{'mysql'} = 'mariadb';
           }
     } elsif ($distro =~ /^(?:centos|rhes|scientific)(\d+)/) {      } elsif ($distro =~ /^(?:centos|rhes|scientific)(\d+)/) {
         my $version = $1;          my $version = $1;
         if ($version >= 7) {          if ($version >= 7) {
Line 1780  CREATE TABLE IF NOT EXISTS metadata (tit Line 1786  CREATE TABLE IF NOT EXISTS metadata (tit
   
 sub setup_mysql_permissions {  sub setup_mysql_permissions {
     my ($dbh,$has_pass,@mysql_lc_commands) = @_;      my ($dbh,$has_pass,@mysql_lc_commands) = @_;
     my ($mysqlversion,$mysqlsubver) = &get_mysql_version();      my ($mysqlversion,$mysqlsubver,$mysqlname) = &get_mysql_version();
     my ($usesauth,@mysql_commands);      my ($usesauth,@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','','','')",          @mysql_commands = ("INSERT user (Host, User, ssl_cipher, x509_issuer, x509_subject) VALUES('localhost','www','','','')",
                            "ALTER USER 'www'\@'localhost' IDENTIFIED BY 'localhostkey'");                           "ALTER USER 'www'\@'localhost' IDENTIFIED BY 'localhostkey'");
         $usesauth = 1;  
     } else {      } else {
         @mysql_commands = ("INSERT user (Host, User, Password) VALUES('localhost','www',password('localhostkey'));");          @mysql_commands = ("INSERT user (Host, User, Password) VALUES('localhost','www',password('localhostkey'));");
     }      }
Line 1880  sub new_mysql_rootpasswd { Line 1894  sub new_mysql_rootpasswd {
 }  }
   
 sub get_mysql_version {  sub get_mysql_version {
     my ($version,$subversion);      my ($version,$subversion,$name);
     if (open(PIPE," mysql -V |")) {      if (open(PIPE," mysql -V |")) {
         my $info = <PIPE>;          my $info = <PIPE>;
         chomp($info);          chomp($info);
         close(PIPE);          close(PIPE);
         ($version,$subversion) = ($info =~ /(\d+\.\d+)\.(\d+)[\-\w]*,/);          ($version,$subversion,$name) = ($info =~ /(\d+\.\d+)\.(\d+)\-?(\w*),/);
     } else {      } else {
         print &mt('Could not determine which version of MySQL is installed.').          print &mt('Could not determine which version of MySQL is installed.').
               "\n";                "\n";
     }      }
     return ($version,$subversion);      return ($version,$subversion,$name);
 }  }
   
 ###########################################################  ###########################################################

Removed from v.1.36  
changed lines
  Added in v.1.39


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>