Commit 78b23c0d authored by Vincent Pelletier's avatar Vincent Pelletier

stack/erp5: Fix LD_PRELOAD extension.

parent 263214b9
...@@ -86,7 +86,7 @@ md5sum = 0648e38bd5d3a15bb9f93264932740b9 ...@@ -86,7 +86,7 @@ md5sum = 0648e38bd5d3a15bb9f93264932740b9
[template-zope] [template-zope]
filename = instance-zope.cfg.in filename = instance-zope.cfg.in
md5sum = d942854541f20faa57716b58959e1310 md5sum = c03f93f95333e6a61b857dcfab7f9c0e
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
......
...@@ -172,13 +172,20 @@ template = inline: {{ ' ...@@ -172,13 +172,20 @@ template = inline: {{ '
rendered = ${directory:etc}/hosts rendered = ${directory:etc}/hosts
context = key host_dict hosts-parameter:host-dict context = key host_dict hosts-parameter:host-dict
[userhosts-bin]
recipe = slapos.recipe.template:jinja2
mode = 755
template = inline:#!{{ parameter_dict['dash'] }}/bin/dash
export HOSTS=${hosts:rendered}
export LD_PRELOAD={{ parameter_dict['userhosts'] }}:$LD_PRELOAD
exec "$@"
rendered = ${directory:bin}/userhosts
[userhosts-wrapper-base] [userhosts-wrapper-base]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
environment = environment =
HOSTALIASES=${hostaliases:rendered} HOSTALIASES=${hostaliases:rendered}
HOSTS=${hosts:rendered} command-line = '${userhosts-bin:rendered}' ${:wrapped-command-line}
LD_PRELOAD={{ parameter_dict['userhosts'] }}:$LD_PRELOAD
command-line = ${:wrapped-command-line}
{# Hack to deploy SSL certs via instance parameters -#} {# Hack to deploy SSL certs via instance parameters -#}
{% for zodb in zodb_dict.itervalues() -%} {% for zodb in zodb_dict.itervalues() -%}
......
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