X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=lib%2Fcommon-functions.sh;h=6b259ac1f7a4d5f9390c77d00c45edd7395428a3;hb=b9947ec813fea9c71b7c3208df36d110eca90b55;hp=dfac008e8e84bed67f2a041ba8a3cec8f3248ca7;hpb=217a97a33db42da90e7f62231b74efa3ef120131;p=apex.git diff --git a/lib/common-functions.sh b/lib/common-functions.sh index dfac008e..6b259ac1 100644 --- a/lib/common-functions.sh +++ b/lib/common-functions.sh @@ -18,7 +18,7 @@ function find_ip { return 1 fi - python3.4 -B $CONFIG/lib/python/apex-python-utils.py find_ip -i $1 + python3.4 -B $LIB/python/apex-python-utils.py find-ip -i $1 } ##attach interface to OVS and set the network config correctly @@ -154,7 +154,7 @@ function detach_interface_from_ovs { if_dns2=$(sed -n 's/^DNS2=\(.*\)$/\1/p' ${net_path}/ifcfg-${bridge}) if [ -z "$if_mask" ]; then - if_prefix=$(sed -n 's/^PREFIX=\(.*\)$/\1/p' ${net_path}/ifcfg-${bridge}) + if_prefix=$(sed -n 's/^PREFIX=[^0-9]*\([0-9][0-9]*\)[^0-9]*$/\1/p' ${net_path}/ifcfg-${bridge}) if_mask=$(prefix2mask ${if_prefix}) fi