diff --git a/lib/img-functions b/lib/img-functions index 05faad87..a73face3 100644 --- a/lib/img-functions +++ b/lib/img-functions @@ -86,7 +86,13 @@ function create_base () { # Recreate resolv.conf sudo touch $TMP_MOUNT_PATH/etc/resolv.conf sudo chmod 777 $TMP_MOUNT_PATH/etc/resolv.conf - echo nameserver 8.8.8.8 > $TMP_MOUNT_PATH/etc/resolv.conf + # use system configured resolv.conf if available to support internal proxy resolving + if [ -e /etc/resolv.conf ] + then + cat /etc/resolv.conf > $TMP_MOUNT_PATH/etc/resolv.conf + else + echo nameserver 8.8.8.8 > $TMP_MOUNT_PATH/etc/resolv.conf + fi # supporting kernel file systems sudo mount -t proc none $TMP_MOUNT_PATH/proc