From 252de1c5194664419dc188aebb11292becc50eb9 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Wed, 1 Feb 2012 15:39:46 +0100 Subject: [PATCH] [scripts] mkloopcard: fix CHROOT_DIR path --- scripts/mkloopcard.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/mkloopcard.sh b/scripts/mkloopcard.sh index ec19ec1..2110a26 100755 --- a/scripts/mkloopcard.sh +++ b/scripts/mkloopcard.sh @@ -33,8 +33,6 @@ FILE="${2}" SIZE="${3}" BOOT_DIR="${4}" CHROOT_DIR="${5}" -# we use this in *remaster_{pre,post}.sh scripts -export CHROOT_DIR # Should we make a tarball of the rootfs and bootfs? MAKE_TARBALL="${MAKE_TARBALL:-1}" @@ -51,7 +49,7 @@ cleanup_loopbacks() { [[ -n "${ext_part}" ]] && losetup -d "${ext_part}" 2> /dev/null [[ -n "${DRIVE}" ]] && losetup -d "${DRIVE}" 2> /dev/null # make sure to have run this - [[ -n "${CHROOT_DIR}" ]] && /sabayon/scripts/mmc_remaster_post.sh + [[ -n "${tmp_dir}" ]] && CHROOT_DIR="${tmp_dir}" /sabayon/scripts/mmc_remaster_post.sh } trap "cleanup_loopbacks" 1 2 3 6 9 14 15 EXIT @@ -144,7 +142,7 @@ mount "${ext_part}" "${tmp_dir}" rsync -a -H -A -X --delete-during "${CHROOT_DIR}"/ "${tmp_dir}"/ --exclude "/proc/*" --exclude "/sys/*" \ --exclude "/dev/pts/*" --exclude "/dev/shm/*" || exit 1 -[[ -n "${CHROOT_DIR}" ]] && /sabayon/scripts/remaster_pre.sh || exit 1 +CHROOT_DIR="${tmp_dir}" /sabayon/scripts/remaster_pre.sh || exit 1 # Configure 00-board-setup.start source_board_setup="/sabayon/boot/arm_startup/00-board-setup.start" @@ -178,7 +176,7 @@ chown root "${target_chroot_script}" || exit 1 chroot "${tmp_dir}" "/${chroot_script_name}" || exit 1 rm -f "${target_chroot_script}" -[[ -n "${CHROOT_DIR}" ]] && /sabayon/scripts/mmc_remaster_post.sh +CHROOT_DIR="${tmp_dir}" /sabayon/scripts/mmc_remaster_post.sh # execute final cleanup of entropy stuff chroot "${tmp_dir}" equo rescue vacuum