commit: 94b080b8ac948a9d940d4d902478ab941870ffa7 Author: layman <layman <AT> localhost> AuthorDate: Wed May 13 18:22:16 2015 +0000 Commit: Brian Evans <grknight <AT> gentoo <DOT> org> CommitDate: Wed May 13 18:22:16 2015 +0000 URL: https://gitweb.gentoo.org/proj/mysql.git/commit/?id=94b080b8
Wait for server to come available under s6 dev-db/mysql-init-scripts/files/init.d-s6 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dev-db/mysql-init-scripts/files/init.d-s6 b/dev-db/mysql-init-scripts/files/init.d-s6 index dfbe7f6..da97b30 100644 --- a/dev-db/mysql-init-scripts/files/init.d-s6 +++ b/dev-db/mysql-init-scripts/files/init.d-s6 @@ -78,6 +78,17 @@ start_pre() { fi } +start_post() { + local socket=$(get_config "${MY_CNF}" socket | tail -n1) + local chroot=$(get_config "${MY_CNF}" chroot | tail -n1) + local startup_timeout=${STARTUP_TIMEOUT:-900} + + if [ -n "${chroot}" ] ; then + socket="${chroot}/${socket}" + fi + ewaitfile ${startup_timeout} "${socket}" +} + checkconfig() { local my_cnf="${MY_CNF:-/etc/${SVCNAME}/my.cnf}" local basedir=$(get_config "${my_cnf}" basedir | tail -n1)