1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Bug #32679: mysqld_safe looks for errmsg.sys in wrong path

The fix for bug 28544 moved our package data from ./share/mysql
to ./share.  mysqld_safe had the old directory hard-coded.  The
fix is to use the @pkgdatadir@ and @prefix@ values, to adapt to
different ways of building the package.
This commit is contained in:
tsmith@ramayana.hindu.god
2007-12-03 18:19:35 -07:00
parent 4530750499
commit 95b791c7af
4 changed files with 87 additions and 4 deletions

View File

@@ -200,16 +200,24 @@ parse_arguments() {
#
# First, try to find BASEDIR and ledir (where mysqld is)
#
#
if echo '@pkgdatadir@' | grep '^@prefix@' > /dev/null
then
relpkgdata=`echo '@pkgdatadir@' | sed -e 's,^@prefix@,,' -e 's,^/,,' -e 's,^,./,'`
else
# pkgdatadir is not relative to prefix
relpkgdata='@pkgdatadir@'
fi
MY_PWD=`pwd`
# Check for the directories we would expect from a binary release install
if test -f ./share/mysql/english/errmsg.sys -a -x ./bin/mysqld
if test -f "$relpkgdata"/english/errmsg.sys -a -x ./bin/mysqld
then
MY_BASEDIR_VERSION=$MY_PWD # Where bin, share and data are
ledir=$MY_BASEDIR_VERSION/bin # Where mysqld is
# Check for the directories we would expect from a source install
elif test -f ./share/mysql/english/errmsg.sys -a -x ./libexec/mysqld
elif test -f "$relpkgdata"/english/errmsg.sys -a -x ./libexec/mysqld
then
MY_BASEDIR_VERSION=$MY_PWD # Where libexec, share and var are
ledir=$MY_BASEDIR_VERSION/libexec # Where mysqld is
@@ -219,6 +227,7 @@ else
ledir=@libexecdir@
fi
#
# Second, try to find the data directory
#