Fixed bug in vbrg install script here document 23/21323/5
authorItohan <itohan.ukponmwan@intel.com>
Mon, 30 Oct 2017 23:59:30 +0000 (16:59 -0700)
committerItohan <itohan.ukponmwan@intel.com>
Tue, 31 Oct 2017 01:19:22 +0000 (18:19 -0700)
Modified script to correctly configure snat
rules

Change-Id: Ie88f747f05745070cfdab2f35eb78f2f01177436
Issue-ID: INT-63
Signed-off-by: Itohan <itohan.ukponmwan@intel.com>
vnfs/vCPE/scripts/v_brgemu_install.sh

index 64621c0..94ed76d 100755 (executable)
@@ -199,7 +199,8 @@ EOF
     echo $NICS
 
     BRG_BNG_NIC=GigabitEthernet`echo ${NICS} | cut -d " " -f 2`  # second interface in list
+    echo $BRG_BNG_NIC > /opt/config/brg_nic.txt
+
     cat > /etc/vpp/setup.gate << EOF
 set int state ${BRG_BNG_NIC} up
 set dhcp client intfc ${BRG_BNG_NIC} hostname brg-emulator
@@ -219,13 +220,15 @@ EOF
 #!/bin/bash
 while :
 do
-        if [[ ! $(ps -aux | grep [[:alnum:]]*/vpp/startup.conf | wc -l) = 2 ]]; then
+        if [[ ! $(ps -aux | grep [[:alnum:]]*/vpp/startup.conf | wc -l) = 2 ]];
+        then
                 echo "vpp not running"
         else
                 break
         fi
 done
 
+BRG_BNG_NIC=$(cat /opt/config/brg_nic.txt)
 sdnc_ip=$(cat /opt/config/sdnc_ip.txt)
 
 vppctl tap connect tap0