aboutsummaryrefslogtreecommitdiff
path: root/release/tools/vmimage.subr
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2014-11-21 02:30:37 +0000
committerGlen Barber <gjb@FreeBSD.org>2014-11-21 02:30:37 +0000
commit30a20c89bf905f464bf62a3904e74802fb86b80d (patch)
tree095848fbc0b45e0fd18c4ed38d78e4dae959d827 /release/tools/vmimage.subr
parent32dbc829820b1b03bf2e27d204cb3fee8d072da9 (diff)
downloadsrc-30a20c89bf905f464bf62a3904e74802fb86b80d.tar.gz
src-30a20c89bf905f464bf62a3904e74802fb86b80d.zip
Revert r274773, after I *specifically* objected to this change
numerous times. Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/projects/release-vmimage/; revision=274775
Diffstat (limited to 'release/tools/vmimage.subr')
-rw-r--r--release/tools/vmimage.subr21
1 files changed, 11 insertions, 10 deletions
diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr
index 63e39066fea2..c7805721d2a5 100644
--- a/release/tools/vmimage.subr
+++ b/release/tools/vmimage.subr
@@ -90,6 +90,8 @@ vm_install_base() {
chroot ${DESTDIR} /etc/rc.d/ldconfig forcestart
umount ${DESTDIR}/dev
+ cp /etc/resolv.conf ${DESTDIR}/etc/resolv.conf
+
return 0
}
@@ -112,18 +114,15 @@ vm_extra_enable_services() {
}
vm_extra_install_packages() {
+ mkdir -p ${DESTDIR}/dev
+ mount -t devfs devfs ${DESTDIR}/dev
+ chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \
+ /usr/sbin/pkg bootstrap -y
if [ ! -z "${VM_EXTRA_PACKAGES}" ]; then
- PKGSDIR=`mktemp -d`
- ABI=`/usr/sbin/pkg -c ${DESTDIR} config abi`
- /usr/sbin/pkg -o ABI=${ABI} fetch -o ${PKGSDIR} -d -y ${VM_EXTRA_PACKAGES}
- for PKG in ${PKGSDIR}/All/*; do
- /usr/sbin/pkg -c ${DESTDIR} add -M - < ${PKG}
- done
- rm -r ${PKGSDIR}
- if [ -z "${NOREPOSQLITE}" ]; then
- cp /var/db/pkg/repo-FreeBSD.sqlite ${DESTDIR}/var/db/pkg
- fi
+ chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \
+ /usr/sbin/pkg install -y ${VM_EXTRA_PACKAGES}
fi
+ umount ${DESTDIR}/dev
return 0
}
@@ -139,6 +138,8 @@ vm_extra_pre_umount() {
# Prototype. When overridden, installs additional ports within the
# virtual machine environment.
+ rm -f ${DESTDIR}/etc/resolv.conf
+
return 0
}