summaryrefslogtreecommitdiff
path: root/support-files
diff options
context:
space:
mode:
authorunknown <igreenhoe@mysql.com>2006-04-06 10:13:46 -0700
committerunknown <igreenhoe@mysql.com>2006-04-06 10:13:46 -0700
commitcaa16cbfe7e9a6506eb7019d7a7346ce77740338 (patch)
tree7e6caeab5d7e620d9606173ba749ab0730b8c8d1 /support-files
parent57cfa4d17c1e2e05fa71e19c126a59c8a6a03c81 (diff)
downloadmariadb-git-caa16cbfe7e9a6506eb7019d7a7346ce77740338.tar.gz
Fix for Bug #16240
support-files/mysql.server.sh: Fixed so that if the datadir has been set via the command line, it won't be reset by specifing the basedir after.
Diffstat (limited to 'support-files')
-rw-r--r--support-files/mysql.server.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh
index 1892e8b4a46..bf17375c0eb 100644
--- a/support-files/mysql.server.sh
+++ b/support-files/mysql.server.sh
@@ -72,6 +72,10 @@ else
libexecdir="$basedir/libexec"
fi
+# datadir_set is used to determine if datadir was set (and so should be
+# *not* set inside of the --basedir= handler.)
+datadir_set=
+
#
# Use LSB init script functions for printing messages, if possible
#
@@ -105,11 +109,15 @@ parse_server_arguments() {
case "$arg" in
--basedir=*) basedir=`echo "$arg" | sed -e 's/^[^=]*=//'`
bindir="$basedir/bin"
- datadir="$basedir/data"
+ if test -z "$datadir_set"; then
+ datadir="$basedir/data"
+ fi
sbindir="$basedir/sbin"
libexecdir="$basedir/libexec"
;;
- --datadir=*) datadir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
+ --datadir=*) datadir=`echo "$arg" | sed -e 's/^[^=]*=//'`
+ datadir_set=1
+ ;;
--user=*) user=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
--pid-file=*) server_pid_file=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
--use-mysqld_safe) use_mysqld_safe=1;;