Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
slapos
Commits
14232ec4
Commit
14232ec4
authored
May 23, 2013
by
Yusei Tahara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow any environment variables.
parent
20d2c4e5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
slapos/recipe/generic_cloudooo/__init__.py
slapos/recipe/generic_cloudooo/__init__.py
+5
-1
slapos/recipe/generic_cloudooo/template/cloudooo.cfg.in
slapos/recipe/generic_cloudooo/template/cloudooo.cfg.in
+3
-3
No files found.
slapos/recipe/generic_cloudooo/__init__.py
View file @
14232ec4
...
@@ -38,16 +38,20 @@ class Recipe(GenericBaseRecipe):
...
@@ -38,16 +38,20 @@ class Recipe(GenericBaseRecipe):
port
=
int
(
self
.
options
[
'port'
]),
port
=
int
(
self
.
options
[
'port'
]),
openoffice_port
=
int
(
self
.
options
[
'openoffice-port'
]),
openoffice_port
=
int
(
self
.
options
[
'openoffice-port'
]),
)
)
environment_variable_list
=
[]
for
env_line
in
self
.
options
[
'environment'
].
splitlines
():
for
env_line
in
self
.
options
[
'environment'
].
splitlines
():
env_line
=
env_line
.
strip
()
env_line
=
env_line
.
strip
()
if
not
env_line
:
if
not
env_line
:
continue
continue
if
'='
in
env_line
:
if
'='
in
env_line
:
env_key
,
env_value
=
env_line
.
split
(
'='
)
env_key
,
env_value
=
env_line
.
split
(
'='
)
conversion_server_dict
[
env_key
.
strip
()]
=
env_value
.
strip
(
)
environment_variable_list
.
append
((
env_key
.
strip
(),
env_value
.
strip
())
)
else
:
else
:
raise
zc
.
buildout
.
UserError
(
'Line %r in environment parameter is '
raise
zc
.
buildout
.
UserError
(
'Line %r in environment parameter is '
'incorrect'
%
env_line
)
'incorrect'
%
env_line
)
conversion_server_dict
[
'ENVIRONMENT_VARIABLE_LIST'
]
=
'
\
n
'
.
join
(
[
'env-%s = %s'
%
(
key
,
value
)
for
key
,
value
in
environment_variable_list
]
)
config_file
=
self
.
createFile
(
self
.
options
[
'configuration-file'
],
config_file
=
self
.
createFile
(
self
.
options
[
'configuration-file'
],
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'cloudooo.cfg.in'
),
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'cloudooo.cfg.in'
),
conversion_server_dict
))
conversion_server_dict
))
...
...
slapos/recipe/generic_cloudooo/template/cloudooo.cfg.in
View file @
14232ec4
...
@@ -33,9 +33,9 @@ application_hostname = %(ip)s
...
@@ -33,9 +33,9 @@ application_hostname = %(ip)s
# OpenOffice Port
# OpenOffice Port
openoffice_port = %(openoffice_port)s
openoffice_port = %(openoffice_port)s
# LD_LIBRARY_PATH
passed to OpenOffice
# LD_LIBRARY_PATH
and other environment variables
env-LD_LIBRARY_PATH = %(LD_LIBRARY_PATH)s
# passed to OpenOffice
env-FONTCONFIG_FILE = %(FONTCONFIG_FILE
)s
%(ENVIRONMENT_VARIABLE_LIST
)s
#
#
# Mimetype Registry
# Mimetype Registry
...
...
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