diff options
author | tsmith@ramayana.hindu.god <> | 2007-12-03 18:19:35 -0700 |
---|---|---|
committer | tsmith@ramayana.hindu.god <> | 2007-12-03 18:19:35 -0700 |
commit | 95b791c7af4c5659e1c022de100af15dd8fd39cd (patch) | |
tree | a594af18aa6e95dbcc2a10bc8cff1655c4acae7a /scripts/mysqld_safe.sh | |
parent | 45307504997c801ef119660576c5b326d061713d (diff) | |
download | mariadb-git-95b791c7af4c5659e1c022de100af15dd8fd39cd.tar.gz |
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.
Diffstat (limited to 'scripts/mysqld_safe.sh')
-rw-r--r-- | scripts/mysqld_safe.sh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index 99dcafbbf71..5e7a177a546 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -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 # |