[scripts] mkloopcard: fix CHROOT_DIR path

This commit is contained in:
Fabio Erculiani 2012-02-01 15:39:46 +01:00
parent bd371cdab4
commit 252de1c519

View File

@ -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