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
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
Levin Zimmermann
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
Hide 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):
port
=
int
(
self
.
options
[
'port'
]),
openoffice_port
=
int
(
self
.
options
[
'openoffice-port'
]),
)
environment_variable_list
=
[]
for
env_line
in
self
.
options
[
'environment'
].
splitlines
():
env_line
=
env_line
.
strip
()
if
not
env_line
:
continue
if
'='
in
env_line
:
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
:
raise
zc
.
buildout
.
UserError
(
'Line %r in environment parameter is '
'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'
],
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'cloudooo.cfg.in'
),
conversion_server_dict
))
...
...
slapos/recipe/generic_cloudooo/template/cloudooo.cfg.in
View file @
14232ec4
...
...
@@ -33,9 +33,9 @@ application_hostname = %(ip)s
# OpenOffice Port
openoffice_port = %(openoffice_port)s
# LD_LIBRARY_PATH
passed to OpenOffice
env-LD_LIBRARY_PATH = %(LD_LIBRARY_PATH)s
env-FONTCONFIG_FILE = %(FONTCONFIG_FILE
)s
# LD_LIBRARY_PATH
and other environment variables
# passed to OpenOffice
%(ENVIRONMENT_VARIABLE_LIST
)s
#
# 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