aboutsummaryrefslogtreecommitdiff
path: root/release/release.sh
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2017-11-15 19:14:44 +0000
committerGlen Barber <gjb@FreeBSD.org>2017-11-15 19:14:44 +0000
commitd294a5246f25d3d5070c74809b6ab9aa703d0d31 (patch)
treeb65fbfa75656b002d4d35fdbc05ac4f94ddc1b19 /release/release.sh
parentcac201b866281310782dd6bdbc75c3be777a1066 (diff)
downloadsrc-d294a5246f25d3d5070c74809b6ab9aa703d0d31.tar.gz
src-d294a5246f25d3d5070c74809b6ab9aa703d0d31.zip
Only copy /etc/resolv.conf to ${CHROOTDIR} if /etc/resolv.conf does
not already exist within ${CHROOTDIR}. This allows re-using a build chroot with CHROOTBUILD_SKIP set to a non-empty value and CHROOTDIR set to '/' in release.conf. MFC after: 3 days Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=325863
Diffstat (limited to 'release/release.sh')
-rwxr-xr-xrelease/release.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/release/release.sh b/release/release.sh
index 6a9a1fd7f2fe..067eec5c09a1 100755
--- a/release/release.sh
+++ b/release/release.sh
@@ -252,8 +252,8 @@ chroot_setup() {
extra_chroot_setup() {
mkdir -p ${CHROOTDIR}/dev
mount -t devfs devfs ${CHROOTDIR}/dev
- [ -e /etc/resolv.conf ] && cp /etc/resolv.conf \
- ${CHROOTDIR}/etc/resolv.conf
+ [ -e /etc/resolv.conf -a ! -e ${CHROOTDIR}/etc/resolv.conf ] && \
+ cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf
# Run ldconfig(8) in the chroot directory so /var/run/ld-elf*.so.hints
# is created. This is needed by ports-mgmt/pkg.
eval chroot ${CHROOTDIR} /etc/rc.d/ldconfig forcerestart