Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
slapos.core
Commits
5533c318
Commit
5533c318
authored
Apr 04, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'no_bridge'
parents
520bd316
f4aa8202
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
17 deletions
+19
-17
CHANGES.txt
CHANGES.txt
+2
-4
slapos/format.py
slapos/format.py
+17
-13
No files found.
CHANGES.txt
View file @
5533c318
...
@@ -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)
-----------------
-----------------
...
...
slapos/format.py
View file @
5533c318
...
@@ -1080,18 +1080,19 @@ class Config(object):
...
@@ -1080,18 +1080,19 @@ 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
):
root_needed
=
True
if
attr
.
lower
()
==
'true'
:
setattr
(
self
,
o
,
True
)
root_needed
=
True
elif
getattr
(
self
,
o
).
lower
()
==
'false'
:
setattr
(
self
,
o
,
True
)
setattr
(
self
,
o
,
False
)
elif
attr
.
lower
()
==
'false'
:
else
:
setattr
(
self
,
o
,
False
)
message
=
'Option %r needs to be "True" or "False", wrong value: '
\
else
:
'%r'
%
(
o
,
getattr
(
self
,
o
))
message
=
'Option %r needs to be "True" or "False", wrong value: '
\
self
.
logger
.
error
(
message
)
'%r'
%
(
o
,
getattr
(
self
,
o
))
raise
UsageError
(
message
)
self
.
logger
.
error
(
message
)
raise
UsageError
(
message
)
if
not
self
.
dry_run
:
if
not
self
.
dry_run
:
if
self
.
alter_user
:
if
self
.
alter_user
:
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment