Update to 5.0.86 release:

- wait for mysql to be responsive at startup

Feature safe:	yes
This commit is contained in:
Alex Dupre 2009-09-24 14:24:15 +00:00
parent 64bbcd996f
commit 7f25d4ef72
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=242018
3 changed files with 23 additions and 5 deletions

View file

@ -6,7 +6,7 @@
#
PORTNAME?= mysql
PORTVERSION= 5.0.85
PORTVERSION= 5.0.86
PORTREVISION?= 0
CATEGORIES= databases
MASTER_SITES= ${MASTER_SITE_MYSQL}

View file

@ -1,3 +1,3 @@
MD5 (mysql-5.0.85.tar.gz) = f672ec5154f8ea3db87fec5e0b227f4c
SHA256 (mysql-5.0.85.tar.gz) = 96978c7bbc53af1a1755bf2963853ba08ca9146dd4a7577ce079194b7ee67f82
SIZE (mysql-5.0.85.tar.gz) = 36124983
MD5 (mysql-5.0.86.tar.gz) = c1f746bfbc8c2cb3ec1e0427a8a88c55
SHA256 (mysql-5.0.86.tar.gz) = fc89f4b1f1a19f6adfd44b30e25dc70899c139f850f304729f2378bef5b76854
SIZE (mysql-5.0.86.tar.gz) = 22170585

View file

@ -16,6 +16,8 @@
# just before mysql starts.
# mysql_dbdir (str): Default to "/var/db/mysql"
# Base database directory.
# mysql_socket (str): Default to "/tmp/mysql.sock"
# Unix socket file.
# mysql_args (str): Custom additional arguments to be passed
# to mysqld_safe (default empty).
#
@ -30,17 +32,21 @@ load_rc_config $name
: ${mysql_enable="NO"}
: ${mysql_limits="NO"}
: ${mysql_dbdir="/var/db/mysql"}
: ${mysql_socket="/tmp/mysql.sock"}
: ${mysql_args=""}
mysql_user="mysql"
mysql_limits_args="-e -U ${mysql_user}"
pidfile="${mysql_dbdir}/`/bin/hostname`.pid"
command="%%PREFIX%%/bin/mysqld_safe"
command_args="--defaults-extra-file=${mysql_dbdir}/my.cnf --user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args} > /dev/null 2>&1 &"
command_args="--defaults-extra-file=${mysql_dbdir}/my.cnf --user=${mysql_user} --datadir=${mysql_dbdir} --socket=${mysql_socket} --pid-file=${pidfile} ${mysql_args} > /dev/null 2>&1 &"
procname="%%PREFIX%%/libexec/mysqld"
start_precmd="${name}_prestart"
start_postcmd="${name}_poststart"
mysql_install_db="%%PREFIX%%/bin/mysql_install_db"
mysql_install_db_args="--ldata=${mysql_dbdir}"
mysqladmin="%%LOCALBASE%%/bin/mysqladmin"
mysqladmin_args="-s --socket=${mysql_socket} ping"
mysql_create_auth_tables()
{
@ -60,4 +66,16 @@ mysql_prestart()
fi
}
mysql_poststart()
{
count=0
while [ $count -lt 10 ] ; do
eval $mysqladmin $mysqladmin_args >/dev/null
[ $? -eq 0 ] && return 0
count=`expr $count + 1`
sleep 1
done
return 1
}
run_rc_command "$1"