Move the trap after env_check(), since CHROOTDIR may be

redefined.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Glen Barber 2015-05-06 14:53:34 +00:00
parent 3ddb84b3bb
commit 43eee0751f

@ -341,8 +341,8 @@ main() {
esac
done
shift $(($OPTIND - 1))
trap "umount ${CHROOTDIR}/dev" EXIT # Clean up devfs mount on exit
env_check
trap "umount ${CHROOTDIR}/dev" EXIT # Clean up devfs mount on exit
chroot_setup
extra_chroot_setup
chroot_build_target