X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lxcsu;h=26c1e9d12a531eb71cb31ba879987c7bc9477f2f;hb=6d2a0b07a3619ab801337024897c5b2f23f584a1;hp=988036081d19679c8b8ee2510e3578f98af97b80;hpb=4626c7937b54f1bb7c8717f275ebf85dd0feb8c6;p=lxc-userspace.git diff --git a/lxcsu b/lxcsu old mode 100644 new mode 100755 index 9880360..26c1e9d --- a/lxcsu +++ b/lxcsu @@ -180,9 +180,7 @@ def main (): for (sysctl_file, sysctl_name, sysctl_val) in sysctls: for fn in ["/sbin/sysctl", "/usr/sbin/sysctl", "/bin/sysctl", "/usr/bin/sysctl"]: if os.path.exists(fn): - os.system("mount -o remount,rw none /proc/sys") os.system('%s -w %s=%s'%(fn, sysctl_name,sysctl_val)) - os.system("mount -o remount,ro none /proc/sys") break else: print "Error: image does not have a sysctl binary" @@ -243,7 +241,8 @@ def main (): os.environ['SHELL'] = '/bin/sh' os.environ['HOME'] = '/home/%s'%slice_name - os.environ['LD_PRELOAD'] = '/etc/planetlab/lib/bind_public.so' + if os.path.exists('/etc/planetlab/lib/bind_public.so'): + os.environ['LD_PRELOAD'] = '/etc/planetlab/lib/bind_public.so' os.chdir("/home/%s"%(slice_name)) if debug: print 'lxcsu:execv:','/usr/bin/setarch',exec_args os.execv('/usr/bin/setarch',exec_args)