--- alx-src/trunk/alxinstall-ng/functions/generic.sh 2015/07/23 12:28:10 6835 +++ alx-src/trunk/alxinstall-ng/functions/generic.sh 2015/07/23 12:28:53 6836 @@ -55,11 +55,11 @@ trap_exit() { [[ -n ${SWAPHDD} ]] && swapoff ${SWAPHDD} - is_loc_mounted "${INSTALLPATH}/dev" && umount ${INSTALLPATH}/dev - is_loc_mounted "${INSTALLPATH}/proc" && umount ${INSTALLPATH}/proc - is_loc_mounted "${INSTALLPATH}/sys" && umount ${INSTALLPATH}/sys - is_loc_mounted "${INSTALLPATH}/boot" && umount ${INSTALLPATH}/boot - is_loc_mounted "${INSTALLPATH}" && umount ${INSTALLPATH} + is_loc_mounted "${INSTALL_ROOT}/dev" && umount ${INSTALL_ROOT}/dev + is_loc_mounted "${INSTALL_ROOT}/proc" && umount ${INSTALL_ROOT}/proc + is_loc_mounted "${INSTALL_ROOT}/sys" && umount ${INSTALL_ROOT}/sys + is_loc_mounted "${INSTALL_ROOT}/boot" && umount ${INSTALL_ROOT}/boot + is_loc_mounted "${INSTALL_ROOT}" && umount ${INSTALL_ROOT} echo "installation aborted" exit 1 } @@ -68,20 +68,20 @@ { local cmd="$@" - is_loc_mounted "${INSTALLPATH}/proc" || mount -t proc proc ${INSTALLPATH}/proc - is_loc_mounted "${INSTALLPATH}/sys" || mount -t sysfs sysfs ${INSTALLPATH}/sys - is_loc_mounted "${INSTALLPATH}/dev" || mount -o bind /dev ${INSTALLPATH}/dev + is_loc_mounted "${INSTALL_ROOT}/proc" || mount -t proc proc ${INSTALL_ROOT}/proc + is_loc_mounted "${INSTALL_ROOT}/sys" || mount -t sysfs sysfs ${INSTALL_ROOT}/sys + is_loc_mounted "${INSTALL_ROOT}/dev" || mount -o bind /dev ${INSTALL_ROOT}/dev - chroot ${INSTALLPATH} ${cmd} || die "enter_chroot() '${INSTALLPATH}' '${cmd}'" + chroot ${INSTALL_ROOT} ${cmd} || die "enter_chroot() '${INSTALL_ROOT}' '${cmd}'" - is_loc_mounted "${INSTALLPATH}/dev" && umount ${INSTALLPATH}/dev - is_loc_mounted "${INSTALLPATH}/sys" && umount ${INSTALLPATH}/sys - is_loc_mounted "${INSTALLPATH}/proc" && umount ${INSTALLPATH}/proc + is_loc_mounted "${INSTALL_ROOT}/dev" && umount ${INSTALL_ROOT}/dev + is_loc_mounted "${INSTALL_ROOT}/sys" && umount ${INSTALL_ROOT}/sys + is_loc_mounted "${INSTALL_ROOT}/proc" && umount ${INSTALL_ROOT}/proc } enter_chroot_installrc() { - [ -f ${INSTALLPATH}/.installrc ] || die "enter_chroot_installrc() ${INSTALLPATH}/.installrc missing" + [ -f ${INSTALL_ROOT}/.installrc ] || die "enter_chroot_installrc() ${INSTALL_ROOT}/.installrc missing" enter_chroot /bin/bash -i /.installrc || die "enter_chroot_installrc() run" - [ -f ${INSTALLPATH}/.installrc ] && rm ${INSTALLPATH}/.installrc + [ -f ${INSTALL_ROOT}/.installrc ] && rm ${INSTALL_ROOT}/.installrc }