summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/LinHES-system
diff options
context:
space:
mode:
authorTom Culliton <culliton@x2.(none)>2009-01-26 05:01:44 (GMT)
committerTom Culliton <culliton@x2.(none)>2009-01-26 05:01:44 (GMT)
commita48d9f6377248f4c5b552f31df2e98f05a5ae6d4 (patch)
tree37ec4927172d244e5e416cb2a0616c6279dbed0b /abs/core-testing/LinHES-system
parent3ae1c7d4757ea8029f62fef790c92dc1d4026f80 (diff)
downloadlinhes_pkgbuild-a48d9f6377248f4c5b552f31df2e98f05a5ae6d4.zip
linhes_pkgbuild-a48d9f6377248f4c5b552f31df2e98f05a5ae6d4.tar.gz
linhes_pkgbuild-a48d9f6377248f4c5b552f31df2e98f05a5ae6d4.tar.bz2
Added some logic to wait for the DB to start responding after restart.
Diffstat (limited to 'abs/core-testing/LinHES-system')
-rw-r--r--abs/core-testing/LinHES-system/bin/backupcommon10
1 files changed, 9 insertions, 1 deletions
diff --git a/abs/core-testing/LinHES-system/bin/backupcommon b/abs/core-testing/LinHES-system/bin/backupcommon
index 9b75db3..39a62e9 100644
--- a/abs/core-testing/LinHES-system/bin/backupcommon
+++ b/abs/core-testing/LinHES-system/bin/backupcommon
@@ -359,7 +359,15 @@ check_files_and_tables () {
}
stop_mysqld () { $SV stop mysql ; }
-start_mysqld () { $SV start mysql ; }
+start_mysqld () {
+ $SV start mysql
+ for t in 1 2 4 8 ; do
+ ready=$(mysql_cmd 'select 1 from dual' 2>/dev/null)
+ [ "$ready" = "1" ] && break
+ sleep "$t"
+ done
+ [ "$ready" != "1" ] && echo "Error, DB not available after 15 seconds!"
+}
stop_mythbackend () { $SV stop mythbackend ; }
start_mythbackend () { $SV start mythbackend ; }