summaryrefslogtreecommitdiffstats
path: root/boot
diff options
context:
space:
mode:
authorMarco Platania <platania@research.att.com>2017-05-23 15:21:37 -0400
committerMarco Platania <platania@research.att.com>2017-05-23 15:21:37 -0400
commit0e385f5330006e18986edeec1c5b73021da93680 (patch)
tree2b307cc72df66e0bf9475357ee22bbcdd5cc99e9 /boot
parent59c11ee674e71c5930d9b34a2615b37451d72989 (diff)
fix portal/dns gre issues
Change-Id: I652e5d8d4389b95feec8ec8b3b953748d3644d41 Signed-off-by: Marco Platania <platania@research.att.com>
Diffstat (limited to 'boot')
-rw-r--r--boot/portal_vm_init.sh21
1 files changed, 13 insertions, 8 deletions
diff --git a/boot/portal_vm_init.sh b/boot/portal_vm_init.sh
index e7ecfe54..f6c0e75c 100644
--- a/boot/portal_vm_init.sh
+++ b/boot/portal_vm_init.sh
@@ -35,12 +35,17 @@ sleep 180
if [ ! -e /opt/config/boot.txt ]
then
- if [ -e /opt/config/public_ip.txt ]
- then
- IP_ADDRESS=$(cat /opt/config/public_ip.txt)
- else
- IP_ADDRESS=$(ifconfig eth0 | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2)
- fi
- mysql -u root -p'Aa123456' -h $IP_ADDRESS < /opt/portal/deliveries/Apps_Users_OnBoarding_Script.sql
- echo "yes" > /opt/config/boot.txt
+ if [ -e /opt/config/public_ip.txt ]
+ then
+ IP_ADDRESS=$(cat /opt/config/public_ip.txt)
+ else
+ IP_ADDRESS=$(ifconfig eth0 | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2)
+ fi
+ # Wait until MySQL is running...
+ while [[ $(netstat -vulntp |grep -i mysql | awk '{print $4}') != ":::3306" ]]
+ do
+ sleep 1
+ done
+ mysql -u root -p'Aa123456' -h $IP_ADDRESS < /opt/portal/deliveries/Apps_Users_OnBoarding_Script.sql
+ echo "yes" > /opt/config/boot.txt
fi