diff options
Diffstat (limited to 'databases/mysql50-server/files/patch-af')
-rw-r--r-- | databases/mysql50-server/files/patch-af | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/databases/mysql50-server/files/patch-af b/databases/mysql50-server/files/patch-af index 2593da4..05b7034 100644 --- a/databases/mysql50-server/files/patch-af +++ b/databases/mysql50-server/files/patch-af @@ -1,43 +1,36 @@ ---- scripts/safe_mysqld.sh.orig Fri May 14 11:11:46 1999 -+++ scripts/safe_mysqld.sh Tue Jun 8 11:14:02 1999 -@@ -12,33 +12,9 @@ - - trap '' 1 2 3 15 # we shouldn't let anyone kill us +--- scripts/safe_mysqld.sh.orig Fri Sep 8 09:50:24 2000 ++++ scripts/safe_mysqld.sh Sat Sep 23 21:16:08 2000 +@@ -36,26 +36,9 @@ + done + } +-MY_PWD=`pwd` -# Check if we are starting this relative (for the binary release) --if test -d ./data/mysql -a -f ./share/mysql/english/errmsg.sys -a \ +-if test -d $MY_PWD/data/mysql -a -f ./share/mysql/english/errmsg.sys -a \ - -x ./bin/mysqld -then -- MY_BASEDIR_VERSION=`pwd` # Where bin, share and data are -- DATADIR=$MY_BASEDIR_VERSION/data # Where the databases are +- MY_BASEDIR_VERSION=$MY_PWD # Where bin, share and data are - ledir=$MY_BASEDIR_VERSION/bin # Where mysqld is +- DATADIR=$MY_BASEDIR_VERSION/data -# Check if this is a 'moved install directory' -elif test -f ./var/mysql/db.frm -a -f ./share/mysql/english/errmsg.sys -a \ - -x ./libexec/mysqld -then -- MY_BASEDIR_VERSION=`pwd` # Where libexec, share and var are -- DATADIR=$MY_BASEDIR_VERSION/var # Where the databases are +- MY_BASEDIR_VERSION=$MY_PWD # Where libexec, share and var are - ledir=$MY_BASEDIR_VERSION/libexec # Where mysqld is +- DATADIR=$MY_BASEDIR_VERSION/var -else - MY_BASEDIR_VERSION=@prefix@ - DATADIR=@localstatedir@ - ledir=@libexecdir@ -- if test ! -x $ledir/mysqld -- then -- echo "The file $ledir/mysqld doesn't exist or is not executable" -- echo "Please do a cd to the mysql installation directory and restart" -- echo "this script from there as follows:" -- echo "./bin/safe_mysqld". -- exit 1; -- fi -fi +MY_BASEDIR_VERSION=@prefix@ +DATADIR=@localstatedir@ +ledir=@libexecdir@ pid_file=$DATADIR/`@HOSTNAME@`.pid - log=$DATADIR/`@HOSTNAME@`.log -@@ -114,33 +90,6 @@ + MYSQL_UNIX_PORT=@MYSQL_UNIX_ADDR@ +@@ -154,33 +137,6 @@ if test ! -f $pid_file # This is removed if normal shutdown then break; @@ -49,12 +42,12 @@ - # but should work for the rest of the servers. - # The only thing is ps x => redhat 5 gives warnings when using ps -x. - # kill -9 is used or the process won't react on the kill. -- numofproces=`ps x | grep -v "grep" | grep -c $ledir/mysqld` +- numofproces=`ps xa | grep -v "grep" | grep -c $ledir/mysqld` - echo -e "\nNumber of processes running now: $numofproces" | tee -a $err_log - I=1 - while test "$I" -le "$numofproces" - do -- PROC=`ps x | grep $ledir/mysqld | grep -v "grep" | tail -1` +- PROC=`ps xa | grep $ledir/mysqld | grep -v "grep" | tail -1` - for T in $PROC - do - break @@ -69,5 +62,5 @@ - I=`expr $I + 1` - done fi - echo "mysqld restarted on " `date` | tee -a $err_log + echo "`date +'%y%m%d %H:%M:%S mysqld restarted'`" | tee -a $err_log done |