summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjani@ua141d10.elisa.omakaista.fi <>2005-02-23 19:22:52 +0200
committerjani@ua141d10.elisa.omakaista.fi <>2005-02-23 19:22:52 +0200
commitd5f573713aeac2bde0d1fa9d6c8cc38559f81cdc (patch)
tree4a3cefcdceab9000d36941ccca76032315d089e9
parentc6f1e9627a1f47d87b5f4172b549ab66efd7c297 (diff)
parent6e9b26e8b75422959b48c673b5f6abeae7fa69ad (diff)
downloadmariadb-git-d5f573713aeac2bde0d1fa9d6c8cc38559f81cdc.tar.gz
Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.0
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0
-rw-r--r--scripts/mysqld_safe.sh23
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