Commit 60dcf739 authored by unknown's avatar unknown

Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-4.1

into mysql.com:/home/cps/mysql/trees/mysql-4.1

parents 6ae390fd dbbe0690
...@@ -90,7 +90,18 @@ wait_for_pid () { ...@@ -90,7 +90,18 @@ wait_for_pid () {
i=0 i=0
while test $i -lt 35 ; do while test $i -lt 35 ; do
sleep 1 sleep 1
case "$1" in
'created')
test -s $pid_file && i='' && break test -s $pid_file && i='' && break
;;
'removed')
test ! -s $pid_file && i='' && break
;;
*)
echo "wait_for_pid () usage: wait_for_pid created|removed"
exit 1
;;
esac
echo $echo_n ".$echo_c" echo $echo_n ".$echo_c"
i=`expr $i + 1` i=`expr $i + 1`
done done
...@@ -180,7 +191,7 @@ case "$mode" in ...@@ -180,7 +191,7 @@ case "$mode" in
# be overwritten at next upgrade. # be overwritten at next upgrade.
echo $echo_n "Starting MySQL" echo $echo_n "Starting MySQL"
$bindir/mysqld_safe --datadir=$datadir --pid-file=$pid_file >/dev/null 2>&1 & $bindir/mysqld_safe --datadir=$datadir --pid-file=$pid_file >/dev/null 2>&1 &
wait_for_pid wait_for_pid created
# Make lock for RedHat / SuSE # Make lock for RedHat / SuSE
if test -w /var/lock/subsys if test -w /var/lock/subsys
...@@ -201,7 +212,7 @@ case "$mode" in ...@@ -201,7 +212,7 @@ case "$mode" in
echo $echo_n "Shutting down MySQL" echo $echo_n "Shutting down MySQL"
kill $mysqld_pid kill $mysqld_pid
# mysqld should remove the pid_file when it exits, so wait for it. # mysqld should remove the pid_file when it exits, so wait for it.
wait_for_pid wait_for_pid removed
# delete lock for RedHat / SuSE # delete lock for RedHat / SuSE
if test -f /var/lock/subsys/mysql if test -f /var/lock/subsys/mysql
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment