summaryrefslogtreecommitdiff
path: root/scripts/mysqld_safe.sh
diff options
context:
space:
mode:
authorTerje Rosten <terje.rosten@oracle.com>2016-11-16 13:41:27 +0100
committerTerje Rosten <terje.rosten@oracle.com>2016-11-16 14:01:12 +0100
commitcdd57aa719c14f4c2e23ad37674db5b8ca18fe9e (patch)
tree8a0e61eaf7c34459db87103b615c025178f4d0f2 /scripts/mysqld_safe.sh
parenta63185e8638365d401732803ba93b6b149d33c65 (diff)
downloadmariadb-git-cdd57aa719c14f4c2e23ad37674db5b8ca18fe9e.tar.gz
Bug#25088048 ADDITIONAL ISSUES IN MYSQLD_SAFE
Don't read --ledir option from config file. Ignore current working for finding location of mysqld Remove use of chown/chmod in scripts. Be helpful only when basedir is /var/log or /var/lib. Removed unused systemd files for SLES. Set explicit basedir in scripts.
Diffstat (limited to 'scripts/mysqld_safe.sh')
-rw-r--r--scripts/mysqld_safe.sh18
1 files changed, 16 insertions, 2 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 4b103817ab6..a5c87a44e65 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -218,7 +218,13 @@ parse_arguments() {
# mysqld_safe-specific options - must be set in my.cnf ([mysqld_safe])!
--core-file-size=*) core_file_size="$val" ;;
- --ledir=*) ledir="$val" ;;
+ --ledir=*)
+ if [ -z "$pick_args" ]; then
+ log_error "--ledir option can only be used as command line option, found in config file"
+ exit 1
+ fi
+ ledir="$val"
+ ;;
--malloc-lib=*) set_malloc_lib "$val" ;;
--mysqld=*)
if [ -z "$pick_args" ]; then
@@ -394,7 +400,15 @@ else
relpkgdata='@pkgdatadir@'
fi
-MY_PWD=`pwd`
+case "$0" in
+ /*)
+ MY_PWD='@prefix@'
+ ;;
+ *)
+ MY_PWD=`dirname $0`
+ MY_PWD=`dirname $MY_PWD`
+ ;;
+esac
# Check for the directories we would expect from a binary release install
if test -n "$MY_BASEDIR_VERSION" -a -d "$MY_BASEDIR_VERSION"
then