diff options
Diffstat (limited to 'lib/common-functions.sh')
-rw-r--r-- | lib/common-functions.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/common-functions.sh b/lib/common-functions.sh index dfac008e..d01f7918 100644 --- a/lib/common-functions.sh +++ b/lib/common-functions.sh @@ -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 |