# and executes it.
local file_name=$(basename ${1})
local subdir=${2}
- local destdir=".${subdir}/tmp"
+ 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 "Running ${file_name} in chroot ${chroot_path}"
+
+ chroot_path=${clst_chroot_path}${subdir}
+
+ echo "Ensure the file has the executable bit set"
+ chmod +x ${chroot_path}/${destdir}/${file_name}
+
+ echo "Running ${file_name} in chroot:"
+ echo " ${clst_CHROOT} ${chroot_path} ${destdir}/${file_name}"
${clst_CHROOT} ${chroot_path} ${destdir}/${file_name} || exit 1
delete_from_chroot ${destdir}/${file_name}
# boot-loader/filesystem skeleton for the ISO.
cdtar=${clst_cdtar}
[ -z "${cdtar}" ] && die "Required key cdtar not defined, exiting"
- tar xjpf ${cdtar} -C $1 || die "Couldn't extract cdtar ${cdtar}"
+ tar -I lbzip2 -xpf ${cdtar} -C $1 || die "Couldn't extract cdtar ${cdtar}"
}
extract_kernels() {
[ ! -e "${kbinary}" ] && die "Can't find kernel tarball at ${kbinary}"
mkdir -p ${1}/
- tar xjf ${kbinary} -C ${1}/
+ tar -I lbzip2 -xf ${kbinary} -C ${1}/
# change config name from "config-*" to "gentoo", for example
#mv ${1}/config-* ${1}/${x}-config
if [ -f "${kmodules}" ]
then
mkdir -p ${1}/
- tar xjf ${kmodules} -C ${1} lib
+ tar -I lbzip2 -xf ${kmodules} --strip-components 1 -C ${1}/lib lib
else
echo "Can't find kernel modules tarball at ${kmodules}. Skipping...."
fi
kbinary="${clst_chroot_path}/tmp/kerncache/${2}-kernel-initrd-${clst_version_stamp}.tar.bz2"
[ ! -e "${kbinary}" ] && die "Can't find kernel tarball at ${kbinary}"
mkdir -p ${1}/
- tar xjf ${kbinary} -C ${1}/
+ tar -I lbzip2 -xf ${kbinary} -C ${1}/
# change config name from "config-*" to "gentoo", for example
#mv ${1}/config-* ${1}/${2}-config
rm ${1}/config-*