diff options
author | jani@ua141d10.elisa.omakaista.fi <> | 2005-02-23 18:59:54 +0200 |
---|---|---|
committer | jani@ua141d10.elisa.omakaista.fi <> | 2005-02-23 18:59:54 +0200 |
commit | 6e9b26e8b75422959b48c673b5f6abeae7fa69ad (patch) | |
tree | f7624f6f5f846c22b58cfe1ab70810ee8b1369cb /scripts/mysqld_safe.sh | |
parent | f3c0e35e9fba08f42b70ffb7e99ecdc76f4d8c0a (diff) | |
download | mariadb-git-6e9b26e8b75422959b48c673b5f6abeae7fa69ad.tar.gz |
Fixed a compatibility problem.
1) If my.cnf is found in datadir and basedir, give a warning and use the
one in basedir.
2) If my.cnf is found in datadir, use it, but give a warning.
3) No warning if my.cnf is in basedir.
Diffstat (limited to 'scripts/mysqld_safe.sh')
-rw-r--r-- | scripts/mysqld_safe.sh | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index a8615ff2113..e38127ffd8e 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -128,15 +128,28 @@ then else MY_BASEDIR_VERSION=@prefix@ DATADIR=@localstatedir@ - if test -z "$MYSQL_HOME" - then - MYSQL_HOME=$DATADIR # Installation in a not common path - fi ledir=@libexecdir@ fi + if test -z "$MYSQL_HOME" then - MYSQL_HOME=$MY_BASEDIR_VERSION + if test -r "$MY_BASEDIR_VERSION/my.cnf" && test -r "$DATADIR/my.cnf" + then + echo "WARNING: Found two instances of my.cnf -" + echo "$MY_BASEDIR_VERSION/my.cnf and" + echo "$DATADIR/my.cnf" + echo "IGNORING $DATADIR/my.cnf" + echo + MYSQL_HOME=$MY_BASEDIR_VERSION + elif test -r "$DATADIR/my.cnf" + then + echo "WARNING: Found $DATADIR/my.cnf" + echo "Datadir is deprecated place for my.cnf, please move it to $MY_BASEDIR_VERSION" + echo + MYSQL_HOME=$DATADIR + else + MYSQL_HOME=$MY_BASEDIR_VERSION + fi fi export MYSQL_HOME |