From 2ded1b437904d7f9907794ea7f88f5d4046ba53e Mon Sep 17 00:00:00 2001 From: Leigh B Stoller <stoller@flux.utah.edu> Date: Wed, 27 Aug 2014 12:28:27 -0600 Subject: [PATCH] Add small delay if mysqld socket does not exist; this script runs to soon after mysqld starts, and the socket is not there for a few seconds. --- rc.d/2.tbdbcheck.sh.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rc.d/2.tbdbcheck.sh.in b/rc.d/2.tbdbcheck.sh.in index 49452391b2..7952c14889 100644 --- a/rc.d/2.tbdbcheck.sh.in +++ b/rc.d/2.tbdbcheck.sh.in @@ -14,9 +14,13 @@ DBNAME="@TBDBNAME@" LOGFILE="/var/log/mysqlcheck.log" command=/usr/local/bin/mysqlcheck +socket=/tmp/mysql.sock case "$1" in start|faststart|quietstart|onestart|forcestart) + if [ ! -e "$socket" ]; then + sleep 10 + fi rm -f $LOGFILE if [ $MAINSITE == "0" ]; then echo "*** Checking $DBNAME ..." >> $LOGFILE @@ -30,6 +34,7 @@ case "$1" in echo "*** Checking geni-cm ..." >> $LOGFILE $command --auto-repair geni-cm >> $LOGFILE fi + echo -n ' tbdbcheck' ;; stop|faststop|quietstop|onestop|forcestop) ;; -- GitLab