diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-11-15 14:57:45 +0000 |
---|---|---|
committer | Mattia Rizzolo <mattia@mapreri.org> | 2015-11-15 15:01:07 +0000 |
commit | f711827cef4628a8caed03e3d8bb2b6b825345ce (patch) | |
tree | 847f26c2bea82fc59499548c83f6af855be5fb2a | |
parent | 71b10936ac3430564ef9fed06b3f39b7fd6dd1a1 (diff) | |
download | pbuilder-f711827cef4628a8caed03e3d8bb2b6b825345ce.tar pbuilder-f711827cef4628a8caed03e3d8bb2b6b825345ce.tar.gz |
modules: copy /etc/resolv.conf from the host only when USENETWORK=yes
Closes: #753944
-rw-r--r-- | pbuilder-modules | 6 |
1 files changed, 5 insertions, 1 deletions
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" |