Author: gjb
Date: Mon Nov 20 15:46:23 2017
New Revision: 326014
URL: https://svnweb.freebsd.org/changeset/base/326014

Log:
  MFC r325863:
   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.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/release/release.sh
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/release/release.sh
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/release/release.sh
==============================================================================
--- stable/10/release/release.sh        Mon Nov 20 15:03:03 2017        
(r326013)
+++ stable/10/release/release.sh        Mon Nov 20 15:46:23 2017        
(r326014)
@@ -246,8 +246,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
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to