diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/common-functions.sh | 2 | ||||
-rw-r--r-- | lib/python/apex/deploy_env.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/common-functions.sh b/lib/common-functions.sh index 244d7585..2e401b75 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 diff --git a/lib/python/apex/deploy_env.py b/lib/python/apex/deploy_env.py index 5c733248..be8779a9 100644 --- a/lib/python/apex/deploy_env.py +++ b/lib/python/apex/deploy_env.py @@ -129,7 +129,7 @@ class DeploySettings: """ bash_str = '' for key, value in self.deploy_settings['global_params'].items(): - bash_str += "if [ -z \"$(eval echo \$${})\" ]; then\n{}={}\nfi\n".format(key,key, value) + bash_str += "{}={}\n".format(key, value) if 'performance' in self.deploy_settings['deploy_options']: bash_str += self._dump_performance() bash_str += self._dump_deploy_options_array() |