diff options
author | layman <layman@localhost> | 2015-05-13 14:22:16 -0400 |
---|---|---|
committer | layman <layman@localhost> | 2015-05-13 14:22:16 -0400 |
commit | 94b080b8ac948a9d940d4d902478ab941870ffa7 (patch) | |
tree | 711eb03ee574d7bec47c2b1233334ffc7c015874 | |
parent | Sync init script from portage; bashism and checkconfig fixes (diff) | |
download | mysql-94b080b8ac948a9d940d4d902478ab941870ffa7.tar.gz mysql-94b080b8ac948a9d940d4d902478ab941870ffa7.tar.bz2 mysql-94b080b8ac948a9d940d4d902478ab941870ffa7.zip |
Wait for server to come available under s6
-rw-r--r-- | dev-db/mysql-init-scripts/files/init.d-s6 | 11 |
1 files changed, 11 insertions, 0 deletions
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) |