--- /data/timeinc/packages/ti_mysql-5.1.44/bin/mysqld_safe.orig 2010-02-04 10:09:47.000000000 -0500 +++ /data/timeinc/packages/ti_mysql-5.1.44/bin/mysqld_safe 2010-08-18 18:01:59.000000000 -0400 @@ -202,4 +202,5 @@ } +parse_arguments PICK-ARGS-FROM-ARGV "$@" # @@ -248,19 +249,22 @@ # -# Try where the binary installs put it -if test -d $MY_BASEDIR_VERSION/data/mysql +if test -z "$DATADIR" then - DATADIR=$MY_BASEDIR_VERSION/data - if test -z "$defaults" -a -r "$DATADIR/my.cnf" + # Try where the binary installs put it + if test -d $MY_BASEDIR_VERSION/data/mysql + then + DATADIR=$MY_BASEDIR_VERSION/data + if test -z "$defaults" -a -r "$DATADIR/my.cnf" + then + defaults="--defaults-extra-file=$DATADIR/my.cnf" + fi + # Next try where the source installs put it + elif test -d $MY_BASEDIR_VERSION/var/mysql then - defaults="--defaults-extra-file=$DATADIR/my.cnf" + DATADIR=$MY_BASEDIR_VERSION/var + # Or just give up and use our compiled-in default + else + DATADIR=/usr/local/mysql/data fi -# Next try where the source installs put it -elif test -d $MY_BASEDIR_VERSION/var/mysql -then - DATADIR=$MY_BASEDIR_VERSION/var -# Or just give up and use our compiled-in default -else - DATADIR=/usr/local/mysql/data fi @@ -320,5 +324,4 @@ parse_arguments `$print_defaults $defaults --loose-verbose mysqld_safe safe_mysqld` -parse_arguments PICK-ARGS-FROM-ARGV "$@" # Determine what logging facility to use