diff options
author | unknown <monty@donna.mysql.com> | 2001-01-02 21:28:36 +0200 |
---|---|---|
committer | unknown <monty@donna.mysql.com> | 2001-01-02 21:28:36 +0200 |
commit | 2dac1c9fa62ea98755b844eb136775a0e7e15f2f (patch) | |
tree | 33c318e7615694701de309c50963465e1666677b /support-files | |
parent | ebc75eab18864a13c9a77ed9ccfc07286394a543 (diff) | |
download | mariadb-git-2dac1c9fa62ea98755b844eb136775a0e7e15f2f.tar.gz |
Ensure that my_print_defaults is found
Diffstat (limited to 'support-files')
-rw-r--r-- | support-files/mysql.server.sh | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index 83618d0124f..9307a2e3eb2 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -20,6 +20,27 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin export PATH +# Set some defaults +datadir=@localstatedir@ +basedir= +pid_file= +if test -z "$basedir" +then + basedir=@prefix@ + bindir=@bindir@ +else + bindir="$basedir/bin" +fi +if test -z "$pid_file" +then + pid_file=$datadir/`@HOSTNAME@`.pid +else + case "$pid_file" in + /* ) ;; + * ) pid_file="$datadir/$pid_file" ;; + esac +fi + mode=$1 # start or stop parse_arguments() { @@ -36,12 +57,12 @@ parse_arguments() { if test -x ./bin/my_print_defaults then print_defaults="./bin/my_print_defaults" -elif test -x @bindir@/my_print_defaults +elif test -x $bindir/my_print_defaults then - print_defaults="@bindir@/my_print_defaults" -elif test -x @bindir@/mysql_print_defaults + print_defaults="$bindir/my_print_defaults" +elif test -x $bindir/mysql_print_defaults then - print_defaults="@bindir@/mysql_print_defaults" + print_defaults="$bindir/mysql_print_defaults" else # Try to find basedir in /etc/my.cnf conf=/etc/my.cnf @@ -70,28 +91,8 @@ else test -z "$print_defaults" && print_defaults="my_print_defaults" fi -datadir=@localstatedir@ -basedir= -pid_file= parse_arguments `$print_defaults $defaults mysqld mysql_server` -if test -z "$basedir" -then - basedir=@prefix@ - bindir=@bindir@ -else - bindir="$basedir/bin" -fi -if test -z "$pid_file" -then - pid_file=$datadir/`@HOSTNAME@`.pid -else - case "$pid_file" in - /* ) ;; - * ) pid_file="$datadir/$pid_file" ;; - esac -fi - # Safeguard (relative paths, core dumps..) cd $basedir @@ -105,7 +106,7 @@ case "$mode" in # be overwritten at next upgrade. $bindir/safe_mysqld --datadir=$datadir --pid-file=$pid_file & # Make lock for RedHat / SuSE - if test -d /var/lock/subsys + if test -w /var/lock/subsys then touch /var/lock/subsys/mysql fi |