diff options
author | jani@ua141d10.elisa.omakaista.fi <> | 2005-01-04 20:13:47 +0200 |
---|---|---|
committer | jani@ua141d10.elisa.omakaista.fi <> | 2005-01-04 20:13:47 +0200 |
commit | 81d99da104a856f27a19059f4f7b548cd6a0d2ff (patch) | |
tree | 0c8c8b613d9325f9794f856d8ca791f9e10a225d /scripts/mysqld_multi.sh | |
parent | a99921fb3949fec0a2c7eaa2f96ad9ab071f53f3 (diff) | |
download | mariadb-git-81d99da104a856f27a19059f4f7b548cd6a0d2ff.tar.gz |
Added checking for my.cnf file from environment variable MYSQL_HOME
instead of DATADIR.
Diffstat (limited to 'scripts/mysqld_multi.sh')
-rw-r--r-- | scripts/mysqld_multi.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh index ba46fd6fa29..ee873a86c8d 100644 --- a/scripts/mysqld_multi.sh +++ b/scripts/mysqld_multi.sh @@ -4,7 +4,7 @@ use Getopt::Long; use POSIX qw(strftime); $|=1; -$VER="2.11"; +$VER="2.12"; $opt_config_file = undef(); $opt_example = 0; @@ -430,6 +430,16 @@ sub find_groups { $data[$i] = $line; } + if (defined($ENV{MYSQL_HOME}) && -f "$ENV{MYSQL_HOME}/my.cnf" && + -r "$ENV{MYSQL_HOME}/my.cnf") + { + open(MY_CNF, "<$ENV{MYSQL_HOME}/my.cnf") && (@tmp=<MY_CNF>) && + close(MY_CNF); + } + for (; ($line = shift @tmp); $i++) + { + $data[$i] = $line; + } if (-f "$homedir/.my.cnf" && -r "$homedir/.my.cnf") { open(MY_CNF, "<$homedir/.my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF); |