Parameterizes ODL version to deploy options
[apex.git] / lib / common-functions.sh
index dfac008..6b259ac 100644 (file)
@@ -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