diff options
author | ale <ale@FreeBSD.org> | 2009-09-24 22:24:15 +0800 |
---|---|---|
committer | ale <ale@FreeBSD.org> | 2009-09-24 22:24:15 +0800 |
commit | 709eb5936f107628f9eb0894051d69d77a1f05d6 (patch) | |
tree | ee0b7c45125237c2f2ebef8aa9812f5562169dfc /databases | |
parent | e74be9bc0b4a6c55d1fc6d8cc5d1b390ab47c79e (diff) | |
download | freebsd-ports-gnome-709eb5936f107628f9eb0894051d69d77a1f05d6.tar.gz freebsd-ports-gnome-709eb5936f107628f9eb0894051d69d77a1f05d6.tar.zst freebsd-ports-gnome-709eb5936f107628f9eb0894051d69d77a1f05d6.zip |
Update to 5.0.86 release:
- wait for mysql to be responsive at startup
Feature safe: yes
Diffstat (limited to 'databases')
-rw-r--r-- | databases/mysql50-server/Makefile | 2 | ||||
-rw-r--r-- | databases/mysql50-server/distinfo | 6 | ||||
-rw-r--r-- | databases/mysql50-server/files/mysql-server.sh.in | 20 |
3 files changed, 23 insertions, 5 deletions
diff --git a/databases/mysql50-server/Makefile b/databases/mysql50-server/Makefile index 899a91e9752f..b42d65f76ea5 100644 --- a/databases/mysql50-server/Makefile +++ b/databases/mysql50-server/Makefile @@ -6,7 +6,7 @@ # PORTNAME?= mysql -PORTVERSION= 5.0.85 +PORTVERSION= 5.0.86 PORTREVISION?= 0 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_MYSQL} diff --git a/databases/mysql50-server/distinfo b/databases/mysql50-server/distinfo index e5081f0b1fb7..a4ce7ad9bb66 100644 --- a/databases/mysql50-server/distinfo +++ b/databases/mysql50-server/distinfo @@ -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 diff --git a/databases/mysql50-server/files/mysql-server.sh.in b/databases/mysql50-server/files/mysql-server.sh.in index ab764934f82c..a5481112aceb 100644 --- a/databases/mysql50-server/files/mysql-server.sh.in +++ b/databases/mysql50-server/files/mysql-server.sh.in @@ -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" |