Commit 5533c318 authored by Cédric de Saint Martin's avatar Cédric de Saint Martin

Merge branch 'no_bridge'

parents 520bd316 f4aa8202
...@@ -4,10 +4,8 @@ Changes ...@@ -4,10 +4,8 @@ Changes
0.25 (Unreleased) 0.25 (Unreleased)
----------------- -----------------
* Bugfix: Remove CONFIG_SITE from environment variables. On some platforms, it * Fix support for no_bridge option in configuration files for some values:
can change any software's libdir name (to things like lib64) and thus no_bridge = false was stated as true. [Cedric de Saint Martin]
break all other software trying to fetch libraries.
[Cedric de Saint Martin]
0.24 (2012-03-29) 0.24 (2012-03-29)
----------------- -----------------
......
...@@ -1080,12 +1080,13 @@ class Config(object): ...@@ -1080,12 +1080,13 @@ class Config(object):
self.logger.addHandler(logging.StreamHandler()) self.logger.addHandler(logging.StreamHandler())
# Convert strings to booleans # Convert strings to booleans
root_needed = False for o in ['alter_network', 'alter_user', 'no_bridge']:
for o in ['alter_network', 'alter_user']: attr = getattr(self, o)
if getattr(self, o).lower() == 'true': if isinstance(attr, str):
if attr.lower() == 'true':
root_needed = True root_needed = True
setattr(self, o, True) setattr(self, o, True)
elif getattr(self, o).lower() == 'false': elif attr.lower() == 'false':
setattr(self, o, False) setattr(self, o, False)
else: else:
message = 'Option %r needs to be "True" or "False", wrong value: ' \ message = 'Option %r needs to be "True" or "False", wrong value: ' \
...@@ -1102,7 +1103,10 @@ class Config(object): ...@@ -1102,7 +1103,10 @@ class Config(object):
if self.alter_network: if self.alter_network:
self.checkRequiredBinary(['brctl']) self.checkRequiredBinary(['brctl'])
if self.dry_run: # Check if root is needed
if (self.alter_network or self.alter_user) and not self.dry_run:
root_needed = True
else:
root_needed = False root_needed = False
# check root # check root
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment