Merge "Use system resolv.conf file when available"

This commit is contained in:
Jenkins 2012-12-03 21:38:54 +00:00 committed by Gerrit Code Review
commit 7ccf5282ed

View File

@ -86,7 +86,13 @@ function create_base () {
# Recreate resolv.conf # Recreate resolv.conf
sudo touch $TMP_MOUNT_PATH/etc/resolv.conf sudo touch $TMP_MOUNT_PATH/etc/resolv.conf
sudo chmod 777 $TMP_MOUNT_PATH/etc/resolv.conf sudo chmod 777 $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 echo nameserver 8.8.8.8 > $TMP_MOUNT_PATH/etc/resolv.conf
fi
# supporting kernel file systems # supporting kernel file systems
sudo mount -t proc none $TMP_MOUNT_PATH/proc sudo mount -t proc none $TMP_MOUNT_PATH/proc