Diff for /doc/install/linux/install.pl between versions 1.45.2.14 and 1.45.2.15

version 1.45.2.14, 2021/03/28 22:00:27 version 1.45.2.15, 2021/03/28 22:10:35
Line 799  sub uses_firewalld { Line 799  sub uses_firewalld {
     }      }
     if ($checkfirewalld) {      if ($checkfirewalld) {
         my ($loaded,$active);          my ($loaded,$active);
         if (open(PIPE,"systemctl status firewalld |")) {          if (open(PIPE,"systemctl status firewalld 2>/dev/null |")) {
             while (<PIPE>) {              while (<PIPE>) {
                 chomp();                  chomp();
                 if (/^\s*Loaded:\s+(\w+)/) {                  if (/^\s*Loaded:\s+(\w+)/) {
                     $loaded = $1;                      $loaded = $1;
                 }                  }
                 if (/^\s*Active\s+(\w+)/) {                  if (/^\s*Active:\s+(\w+)/) {
                     $active = $1;                      $active = $1;
                 }                  }
             }              }
Line 1668  if ($callsub{'pwauth'}) { Line 1668  if ($callsub{'pwauth'}) {
 if ($callsub{'mysql'}) {  if ($callsub{'mysql'}) {
     if ($dbh) {      if ($dbh) {
         &setup_mysql($callsub{'mysqlperms'},$dbh,$has_pass,          &setup_mysql($callsub{'mysqlperms'},$dbh,$has_pass,
                      $mysql_unix_socket,$has_lcdb);                       $mysql_unix_socket,$has_lcdb,$distro);
     } else {      } else {
         print &mt('Unable to configure MySQL because access is denied.')."\n";          print &mt('Unable to configure MySQL because access is denied.')."\n";
     }      }
Line 2103  sub kill_extra_services { Line 2103  sub kill_extra_services {
 }  }
   
 sub setup_mysql {  sub setup_mysql {
     my ($setup_mysql_permissions,$dbh,$has_pass,$mysql_unix_socket,$has_lcdb) = @_;      my ($setup_mysql_permissions,$dbh,$has_pass,$mysql_unix_socket,$has_lcdb,$distro) = @_;
     my @mysql_lc_commands;      my @mysql_lc_commands;
     unless ($has_lcdb) {      unless ($has_lcdb) {
         push(@mysql_lc_commands,"CREATE DATABASE loncapa");          my $createcmd = 'CREATE DATABASE loncapa';
           if ($distro =~ /^sles(\d+)/) {
               if ($1 > 11) {
                   $createcmd .= ' CHARACTER SET utf8 COLLATE utf8_general_ci';
               }
           } elsif ($distro =~ /^ubuntu(\d+)/) {
               if ($1 > 16) {
                   $createcmd .= ' CHARACTER SET latin1 COLLATE latin1_swedish_ci';
               }
           }
           push(@mysql_lc_commands,$createcmd);
     }      }
     push(@mysql_lc_commands,"USE loncapa");      push(@mysql_lc_commands,"USE loncapa");
     push(@mysql_lc_commands,qq{      push(@mysql_lc_commands,qq{
Line 2152  sub setup_mysql_permissions { Line 2162  sub setup_mysql_permissions {
     if ($usescreate) {      if ($usescreate) {
         @mysql_commands = ("CREATE USER 'www'\@'localhost' IDENTIFIED BY 'localhostkey'");          @mysql_commands = ("CREATE USER 'www'\@'localhost' IDENTIFIED BY 'localhostkey'");
     } elsif ($usesauth) {      } elsif ($usesauth) {
         @mysql_commands = ("INSERT user (Host, User, ssl_cipher, x509_issuer, x509_subject, authentication_string) VALUES('localhost','www','','','','')");          @mysql_commands = ("INSERT user (Host, User, ssl_cipher, x509_issuer, x509_subject, authentication_string) VALUES('localhost','www','','','','')",
                              "FLUSH PRIVILEGES");
         if ($is_mariadb) {          if ($is_mariadb) {
             push(@mysql_commands,"ALTER USER 'www'\@'localhost' IDENTIFIED BY 'localhostkey'");              push(@mysql_commands,"ALTER USER 'www'\@'localhost' IDENTIFIED BY 'localhostkey'");
         } else {          } else {

Removed from v.1.45.2.14  
changed lines
  Added in v.1.45.2.15


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