From: Mike Marchetti Date: Tue, 10 Jan 2017 17:30:23 +0000 (+0000) Subject: - add ^ to regex to avoid matching against 10.*/etc networks X-Git-Tag: v1.0.4~1 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F07%2F907%2F1;p=osm%2Fdevops.git - add ^ to regex to avoid matching against 10.*/etc networks Signed-off-by: Mike Marchetti --- diff --git a/installers/export_ips b/installers/export_ips index fcca76ef..d651b28a 100644 --- a/installers/export_ips +++ b/installers/export_ips @@ -17,7 +17,7 @@ # 23 Sept 2016 -- Gerardo Garcia -- Genesis #Get IP addresses -DEFAULT_IF=`route -n |awk '$1~/0.0.0.0/ {print $8}'` +DEFAULT_IF=`route -n |awk '$1~/^0.0.0.0/ {print $8}'` export DEFAULT_IP=`ip -o -4 a |grep ${DEFAULT_IF}|awk '{split($4,a,"/"); print a[1]}'` export VCA_CONTAINER_IP=`lxc list VCA -c 4|grep eth0 |awk '{print $2}'` export SO_CONTAINER_IP=`lxc list SO-ub -c 4|grep eth0 |awk '{print $2}'`