From f711827cef4628a8caed03e3d8bb2b6b825345ce Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Sun, 15 Nov 2015 14:57:45 +0000 Subject: modules: copy /etc/resolv.conf from the host only when USENETWORK=yes Closes: #753944 --- pbuilder-modules | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pbuilder-modules b/pbuilder-modules index d842687..93916bb 100644 --- a/pbuilder-modules +++ b/pbuilder-modules @@ -468,7 +468,11 @@ function copy_local_configuration () { if [ -n "$CONFDIR" ] && [ -d "$CONFDIR" ]; then log.i "copying files from $CONFDIR (if possible) instead of using the system ones" fi - for a in hosts hostname resolv.conf mailname; do + local tocopy=(hosts hostname mailname) + if [ "$USENETWORK" = "yes" ]; then + local tocopy[${#tocopy[@]}]=resolv.conf + fi + for a in "${tocopy[@]}"; do if [ -n "$CONFDIR" ] && [ -f "$CONFDIR/$a" ]; then rm -f "$BUILDPLACE/etc/$a" cp "$( readlink -f "$CONFDIR/$a" )" "$BUILDPLACE/etc/$a" -- cgit v1.2.3