Commit 81cf3b80 authored by unknown's avatar unknown
Browse files

BUG#24780 workaround for broken installations that depend on using /etc, but...

BUG#24780 workaround for broken installations that depend on using /etc, but were configured differently


scripts/mysqlaccess.sh:
  also look in /etc
scripts/mysqld_multi.sh:
  also look in /etc
parent c9149b9c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -465,6 +465,9 @@ MySQLaccess::Report::Print_Header();
  elsif (-f "@sysconfdir@/$script_conf") {
     require "@sysconfdir@/$script_conf";
  }
  elsif (-f "/etc/$script_conf") {
     require "/etc/$script_conf";
  }

# ****************************
# Read in all parameters
@@ -930,6 +933,7 @@ sub MergeConfigFile {
sub MergeConfigFiles {
    my ($name,$pass,$uid,$gid,$quota,$comment,$gcos,$dir,$shell) = getpwuid $<;
    MergeConfigFile("@sysconfdir@/my.cnf");
    MergeConfigFile("/etc/my.cnf");
    MergeConfigFile("$dir/.my.cnf");
}

+3 −0
Original line number Diff line number Diff line
@@ -432,6 +432,9 @@ sub find_groups
    if (-f "@sysconfdir@/my.cnf" && -r "@sysconfdir@/my.cnf")
    {
      open(MY_CNF, "<@sysconfdir@/my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);
    } elsif (-f "/etc/my.cnf" && -r "/etc/my.cnf")
    {
      open(MY_CNF, "</etc/my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);
    }
    for ($i = 0; ($line = shift @tmp); $i++)
    {