From f4427e7e7f26cd8e521f70031237f9ed043da33d Mon Sep 17 00:00:00 2001 From: "Jorge Manuel B. S. Vicetto (jmbsvicetto)" Date: Fri, 2 Nov 2012 00:17:48 -0100 Subject: [PATCH] Make sure the files we try to execute in the chroot are marked as executable. --- targets/support/functions.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/targets/support/functions.sh b/targets/support/functions.sh index d362ece7..37fa74af 100644 --- a/targets/support/functions.sh +++ b/targets/support/functions.sh @@ -22,10 +22,15 @@ exec_in_chroot(){ local subdir=${2} local destdir=".${subdir}/tmp" + echo "Copying ${file_name} to ${destdir}" copy_to_chroot ${1} ${destdir} - chroot_path=${clst_chroot_path}${subdir} copy_to_chroot ${clst_sharedir}/targets/support/chroot-functions.sh \ ${destdir} + + echo "Ensure the file has the executable bit set" + chmod +x ${destdir}/${file_name} + + chroot_path=${clst_chroot_path}${subdir} echo "Running ${file_name} in chroot ${chroot_path}" ${clst_CHROOT} ${chroot_path} ${destdir}/${file_name} || exit 1 -- 2.26.2