diff options
Diffstat (limited to 'pbuilder-modules')
-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" |