1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00
This commit is contained in:
pekka@mysql.com
2005-04-01 10:13:37 +02:00
8 changed files with 52 additions and 11 deletions

View File

@@ -102,7 +102,18 @@ wait_for_pid () {
i=0
while test $i -lt 35 ; do
sleep 1
test -s $pid_file && i='' && break
case "$1" in
'created')
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"
i=`expr $i + 1`
done
@@ -198,7 +209,7 @@ case "$mode" in
# be overwritten at next upgrade.
echo $echo_n "Starting MySQL"
$sbindir/mysqlmanager $USER_OPTION --pid-file=$pid_file >/dev/null 2>&1 &
wait_for_pid
wait_for_pid created
# Make lock for RedHat / SuSE
if test -w /var/lock/subsys
@@ -219,7 +230,7 @@ case "$mode" in
echo $echo_n "Shutting down MySQL"
kill $mysqlmanager_pid
# mysqlmanager should remove the pid_file when it exits, so wait for it.
wait_for_pid
wait_for_pid removed
# delete lock for RedHat / SuSE
if test -f /var/lock/subsys/mysqlmanager