summaryrefslogtreecommitdiffstats
path: root/vnfs
diff options
context:
space:
mode:
authorMarco Platania <platania@research.att.com>2017-11-04 18:49:02 +0000
committerGerrit Code Review <gerrit@onap.org>2017-11-04 18:49:02 +0000
commitb28978898180b454a3eb4ed799b60f9a7668298e (patch)
tree7b4115b2050417b4e847be38cc524182ae515110 /vnfs
parentadf8e247aebda83555f386cbd5e0dcf79b98bbea (diff)
parent46bcdf2efab68604d0a239fca0291f916e9a4349 (diff)
Merge "Update the v_bng init script to wait for tap0"
Diffstat (limited to 'vnfs')
-rw-r--r--vnfs/vCPE/scripts/v_bng_init.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/vnfs/vCPE/scripts/v_bng_init.sh b/vnfs/vCPE/scripts/v_bng_init.sh
index e4a59835..ce20dc57 100644
--- a/vnfs/vCPE/scripts/v_bng_init.sh
+++ b/vnfs/vCPE/scripts/v_bng_init.sh
@@ -2,5 +2,13 @@
systemctl start vpp
-ip route add 10.3.0.0/24 via 192.168.40.41 dev tap0
+# wait for TAP_DEV to become active before setting a route
+TAP_DEV=tap0
+STATUS=$(ip link show $TAP_DEV 2> /dev/null)
+while [ -z "$STATUS" ]; do
+ echo "$(date) v_bng_init.sh: $TAP_DEV is not yet ready..."
+ sleep 1
+ STATUS=$(ip link show $TAP_DEV 2> /dev/null)
+done
+ip route add 10.3.0.0/24 via 192.168.40.41 dev $TAP_DEV