From: Thierry Parmentelat Date: Thu, 28 Jun 2012 22:25:54 +0000 (+0200) Subject: export LD_PRELOAD X-Git-Tag: nodemanager-2.1-6~1 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=89d56049912ffa1801da238d22e9e297cdcfba09;hp=e8311b034dd023f01664166745d8e221c2d933d5;p=nodemanager.git export LD_PRELOAD --- diff --git a/sliver_lxc.py b/sliver_lxc.py index 441b2e6..c2067a1 100644 --- a/sliver_lxc.py +++ b/sliver_lxc.py @@ -90,10 +90,15 @@ class Sliver_LXC(Sliver_Libvirt, Initscript): command = ['chmod', '755', containerDir] logger.log_call(command, timeout=15*60) - # customize prompt for slice owner + # customize prompt for slice owner, + LD_PRELOAD for transparently wrap bind dot_profile=os.path.join(containerDir,"root/.profile") + ld_preload_msg="""# by default, we define this setting so that calls to bind(2), +# when invoked on 0.0.0.0, get transparently redirected to the public interface of this node +# see https://svn.planet-lab.org/wiki/LxcPortForwarding""" with open(dot_profile,'w') as f: f.write("export PS1='%s@\H \$ '\n"%(name)) + f.write("%s\n"%ld_preload_msg) + f.write("export LD_PRELOAD=/etc/planetlab/lib/bind_public.so\n") # TODO: set quotas...