aboutsummaryrefslogtreecommitdiff
path: root/release/tools/vmimage.subr
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2014-11-19 20:19:53 +0000
committerGlen Barber <gjb@FreeBSD.org>2014-11-19 20:19:53 +0000
commit91333d6a2da25901490044d87e633ac5dba8cb0c (patch)
tree9dd80e295fe87a5b82ef2d993f11a04691044e79 /release/tools/vmimage.subr
parent9d3df3bdb7367f7d0ba2a98d5fd2db7c85823743 (diff)
downloadsrc-91333d6a2da25901490044d87e633ac5dba8cb0c.tar.gz
src-91333d6a2da25901490044d87e633ac5dba8cb0c.zip
In vm_install_base(), copy the host resolv.conf into
the build chroot before attempting to do anything that requires working DNS (i.e., pkg bootstrap). In vm_extra_pre_umount(), remove the resolv.conf before the disk image is unmounted from the backing md(4). Reported by: cperciva Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/projects/release-vmimage/; revision=274725
Diffstat (limited to 'release/tools/vmimage.subr')
-rw-r--r--release/tools/vmimage.subr4
1 files changed, 4 insertions, 0 deletions
diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr
index bc2a7fb1f50f..00a0a2e23da3 100644
--- a/release/tools/vmimage.subr
+++ b/release/tools/vmimage.subr
@@ -85,6 +85,8 @@ vm_install_base() {
chroot ${DESTDIR} /etc/rc.d/ldconfig forcestart
umount ${DESTDIR}/dev
+ cp /etc/resolv.conf ${DESTDIR}/etc/resolv.conf
+
return 0
}
@@ -131,6 +133,8 @@ vm_extra_pre_umount() {
# Prototype. When overridden, installs additional ports within the
# virtual machine environment.
+ rm -f ${DESTDIR}/etc/resolv.conf
+
return 0
}