diff options
author | gjb <gjb@FreeBSD.org> | 2014-11-19 20:19:53 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2014-11-19 20:19:53 +0000 |
commit | ee5ba5e498b6fa4e91c95853282ab74f4359adac (patch) | |
tree | 9dd80e295fe87a5b82ef2d993f11a04691044e79 /release | |
parent | 5b019b36049cac593f05800112642dffee4799ed (diff) | |
download | FreeBSD-src-ee5ba5e498b6fa4e91c95853282ab74f4359adac.zip FreeBSD-src-ee5ba5e498b6fa4e91c95853282ab74f4359adac.tar.gz |
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
Diffstat (limited to 'release')
-rw-r--r-- | release/tools/azure.conf | 2 | ||||
-rw-r--r-- | release/tools/openstack.conf | 2 | ||||
-rw-r--r-- | release/tools/vmimage.subr | 4 |
3 files changed, 8 insertions, 0 deletions
diff --git a/release/tools/azure.conf b/release/tools/azure.conf index 16c207d..3e4a486 100644 --- a/release/tools/azure.conf +++ b/release/tools/azure.conf @@ -33,6 +33,8 @@ vm_extra_pre_umount() { echo 'console="comconsole vidconsole"' >> ${DESTDIR}/boot/loader.conf echo 'comconsole_speed="115200"' >> ${DESTDIR}/boot/loader.conf + rm -f ${DESTDIR}/etc/resolv.conf + return 0 } diff --git a/release/tools/openstack.conf b/release/tools/openstack.conf index 6aa1749..3e0e857 100644 --- a/release/tools/openstack.conf +++ b/release/tools/openstack.conf @@ -22,5 +22,7 @@ vm_extra_pre_umount() { echo 'sshd_enable="YES"' >> ${DESTDIR}/etc/rc.conf echo 'ifconfig_DEFAULT="SYNCDHCP"' >> ${DESTDIR}/etc/rc.conf + rm -f ${DESTDIR}/etc/resolv.conf + return 0 } diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index bc2a7fb..00a0a2e 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 } |