summaryrefslogtreecommitdiffstats
path: root/lcm
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2017-08-31 20:24:07 +0800
committerFu Jinhua <fu.jinhua@zte.com.cn>2017-08-31 13:19:34 +0000
commit88bf2b1ebfefa9aff30405536273a4a5509212f0 (patch)
treed49c02bf13ecb81f9dda33a93a7a0e834c1b19de /lcm
parent48ef2472147db344545d15213f7a0cf91a5db864 (diff)
Add mysql initialize script
run verify job again Change-Id: I1a59a895ca81f50ad2ef95080d856720f3972314 Issue-Id: VFC-198 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
Diffstat (limited to 'lcm')
-rwxr-xr-xlcm/docker/instance_init.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/lcm/docker/instance_init.sh b/lcm/docker/instance_init.sh
index ecf9e86e..03c10a80 100755
--- a/lcm/docker/instance_init.sh
+++ b/lcm/docker/instance_init.sh
@@ -10,6 +10,11 @@ function start_redis_server {
function start_mysql {
service mysql start
+ # Wait for mysql to initialize; Set mysql root password
+ for i in {1..10}; do
+ sleep $i
+ bash /usr/bin/mysqladmin -u root password $MYSQL_ROOT_PASSWORD &> /dev/null && break
+ done
}
function create_database {