- preload = ""
- release = os.uname()[2]
- # 2.6.12 kernels need this
- if release[:5] == "2.6.1":
- library = "{}/lib/libc-opendir-hack.so".format(path)
- if not os.path.exists(library):
- shutil.copy("./libc-opendir-hack.so", library)
- preload = "/bin/env LD_PRELOAD=/lib/libc-opendir-hack.so"
- sysexec("chroot {} {} {}".format(path, preload, cmd), log, shell=shell)
+ return sysexec("chroot {} {}".format(path, cmd), log, shell=shell)