mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
bsdinstall: allow an install script to access packages on the DVD
If installing from the DVD, mount its packages in the chroot at /dist/packages. That way they'll be accessible to an install script. MFC after: 2 weeks Sponsored by: Axcient Reviewed by: gjb Differential Revision: https://reviews.freebsd.org/D35330
This commit is contained in:
parent
f92e0d6acd
commit
6a02539959
|
@ -56,3 +56,9 @@ done
|
|||
# User might want a shell and require devfs, so mount it
|
||||
mkdir $BSDINSTALL_CHROOT/dev 2>/dev/null
|
||||
mount -t devfs devfs $BSDINSTALL_CHROOT/dev
|
||||
|
||||
# If installing from the DVD, mount packages where they'll be accessible
|
||||
if [ -d /packages ]; then
|
||||
mkdir -p $BSDINSTALL_CHROOT/dist/packages
|
||||
mount -t nullfs /packages $BSDINSTALL_CHROOT/dist/packages
|
||||
fi
|
||||
|
|
|
@ -26,6 +26,13 @@
|
|||
#
|
||||
# $FreeBSD$
|
||||
|
||||
# If we mounted the DVD packages, unmount them
|
||||
if [ -d $BSDINSTALL_CHROOT/dist/packages ]; then
|
||||
umount $BSDINSTALL_CHROOT/dist/packages
|
||||
rmdir $BSDINSTALL_CHROOT/dist/packages
|
||||
rmdir $BSDINSTALL_CHROOT/dist
|
||||
fi
|
||||
|
||||
TMP_FSTAB=${TMPDIR:-"/tmp"}/bsdinstall-tmp-fstab
|
||||
|
||||
cat $PATH_FSTAB | awk -v BSDINSTALL_CHROOT=$BSDINSTALL_CHROOT '{
|
||||
|
|
Loading…
Reference in a new issue