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
This commit is contained in:
parent
9d3df3bdb7
commit
91333d6a2d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/release-vmimage/; revision=274725
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user