Commit 912ae37a authored by Vincent Pelletier's avatar Vincent Pelletier Committed by Jérome Perrin

stack/erp5: Fix LD_PRELOAD extension.

parent 805da6f9
...@@ -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 = fece4db89f72c16f8d71019746059469 md5sum = 82d14f1a98197eaf986bcde3318dc870
[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