We need to specify the chroot_path to the chmod call.
authorJorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org>
Fri, 2 Nov 2012 01:48:08 +0000 (00:48 -0100)
committerJorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org>
Fri, 2 Nov 2012 01:48:08 +0000 (00:48 -0100)
targets/support/functions.sh

index 37fa74afc377d45e1d345d38e11395e86c8d6347..80e371ccfa7e9b4af52f79a30c68d5fd24a973dd 100644 (file)
@@ -27,10 +27,11 @@ exec_in_chroot(){
        copy_to_chroot ${clst_sharedir}/targets/support/chroot-functions.sh \
                ${destdir}
 
+       chroot_path=${clst_chroot_path}${subdir}
+
        echo "Ensure the file has the executable bit set"
-       chmod +x ${destdir}/${file_name}
+       chmod +x ${chroot_path}/${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