summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Mancy <rmancy@redhat.com>2011-11-09 14:59:13 +1000
committerRaymond Mancy <rmancy@redhat.com>2011-11-09 14:59:13 +1000
commitaeda396d473e5add71d6e20cc43720b9752e62f9 (patch)
tree6ec46f4c42cd97f592d5edf86759b10b037d1d5f
parente45aaac6cd7abd9a09f90876f130f8cc668e3004 (diff)
This will allow the /distribution/beaker/setup to download and import and existing db dump.
-rwxr-xr-xTasks/distribution/beaker/setup/runtest.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/Tasks/distribution/beaker/setup/runtest.sh b/Tasks/distribution/beaker/setup/runtest.sh
index 06b6703..3ac2082 100755
--- a/Tasks/distribution/beaker/setup/runtest.sh
+++ b/Tasks/distribution/beaker/setup/runtest.sh
@@ -326,8 +326,14 @@ function Inventory()
# Add in Kerberos config
generate_beaker_cfg
mkdir -p /var/www/beaker/harness # in lieu of running beaker-repo-update
-
- beaker-init -u admin -p testing -e $SUBMITTER
+ if [ -n "$IMPORT_DB"]
+ then
+ wget $IMPORT_DB
+ DB_FILE=echo $IMPORT_DB | perl -pe 's|.+/(.+\.xz)$|\1|'
+ xzcat $DB_FILE | mysql
+ else
+ beaker-init -u admin -p testing -e $SUBMITTER
+ fi
estatus_fail "**** Failed to initialize beaker DB ****"
# beaker-init creates the server.log as root. this prevents apache from
# working since it can't write to it.